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