Write a program to display the following series upto 10 terms:
2,8,18...................
Answers
Answered by
15
//BlueJ iterations
//Utilization operations
import java.util.*;
public class Series
{
public static void main(String args[])
{
//Scanner class is unnecessary here
int a,i,n;
//seems the program is need to be run several times so, using for loop
for(i=1; i<= 10; i++)
{
a= Math.pow(i,2);
n=(a+a);
System.out.println("The series is"+n);
}
}
}
//[∵ Seems the program is about the sum of the square of the same numbers.]
Answered by
2
Answer:
solutions is attached above ....
Attachments:
Similar questions