Write a java program to find the series upto 10 terms and also print the value of T . T=1+4+9+16+25....
Answers
Answered by
0
import java.util.*;
class java
{
psvm()
{
Scanner sc=newScanner(System.in)
S.o.p("enter your choice");
int num= sc.nextInt();
int T;
int S;
for(int i = 1;i <= num;i++)
{
S= i*i;
System.out.print(S + "");
}
}
}
Similar questions