write a program to find the series:
1,4,9,.......................................400
Answers
Answered by
7
import java.util.*;
public class series
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int f,m;
for(f=1;f<=20;f++);
{
m=f*f;
System.out.println("Display the series"+m);
}
}
}
Answered by
1
Answer:
package myjava;
import java.util.*;
public class concept
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int i,a=0;
for(i=1;i<=20;i++)
a=i*i;
System.out.println("Display the series="+a);
}
}
Explanation:
Output:Display the series=400
Similar questions
Social Sciences,
5 months ago
Biology,
5 months ago
Geography,
11 months ago
English,
11 months ago
English,
1 year ago