Write a program to display the following series upto 10 terms:
4,8,13.................................................
Answers
Answered by
16
import java.util.*;
public class Series
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in)'
int a,i,n;
for(n=1;n<=10;n++)
for(i=1;i<=10;i++)
{
a=Math.pow(a,2)+n;
System.out.println("Display the series"+a);
}
}
}
Answered by
15
import java.util.*;
public class Series
{
public static void main(String args[])
{
int a,i,n;
for(n=1;n<=10;n++)
for(i=1;i<=10;i++)
{
a=i*i+n;
System.out.println("Display the series"+a);
}
}
}
Similar questions