Find n | Java program to find the n - th term in series 1 3 6 10 . . . ; Function to find nth term ; Driver Code
import java . io . * ; class Series { static int term ( int n ) { return n * ( n + 1 ) / 2 ; } public static void main ( String [ ] args ) { int n = 4 ; System . out . println ( term ( n ) ) ; } }