Computer Science, asked by FGFGY, 1 year ago

write a program to find the series:
1,4,9,.......................................400

Answers

Answered by Anonymous
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 jyotisinghh933
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