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