Program to find Nth term of series 0 , 10 , 30 , 60 , 99 , 150 , 210 , 280. ... ... ... . | Java program to find the N - th term of the series : 0 , 10 , 30 , 60 , 99 , 150 , 210 , ... . . ; calculate Nth term of series ; Driver code
import java . util . * ; class solution { static int nthTerm ( int n ) { return 5 * ( int ) Math . pow ( n , 2 ) - 5 * n ; } public static void main ( String arr [ ] ) { int N = 4 ; System . out . println ( nthTerm ( N ) ) ; } }