Solve the question in java programming
Answers
Answer:-
➡ These are your required answers.
Series 1:-
1 4 7 10....10 terms.
Program:-
class Series
{
public static void main(String args[])
{
int a=1;
for(int i=1;i<=10;i++)
{
System.out.print(a+" ");
a+=3;
}
}
}
Series 2:-
1 4 9 16...10 terms
Program:-
class Series
{
public static void main(String args[])
{
for(int i=1;i<=10;i++)
System.out.print(i*i+" ");
}
}
Series 3:-
3 6 9 12..10 terms.
Program:-
class Series
{
public static void main(String args[])
{
for(int i=1;i<=10;i++)
System.out.print(3*i+" ");
}
}
Series 4:-
10 9 8 7...10 terms.
Program:-
class Series
{
public static void main(String args[])
{
for(int i=10;i>=1;i--)
System.out.print(i+" ");
}
}
Series 5:-
1 2 4 7 11....10 terms.
Program:-
class Series
{
public static void main(String args[])
{
int a=1;
for(int i=1;i<=10;i++)
{
System.out.print(a+" ");
a+=i;
}
}
}
- 1,4,7,10
class check
{
public static void main (String ar[])
{
int d=1;
for(int I=1;I<=10;I++)
{
System.out.print(d+" ") ;
d+=3;
}
}
_______
- 1,4,9,16
class check
{
public static void main (String ar[])
{
for(int I=1;I<=10;I++)
System.out.print((I*I)+" ") ;
}
}
__________
- 3,6,9,12
class check
{
public static void main (String ar[])
{
for(int I=1;I<=10;I++)
System.out.print((3*I)+" ") ;
}
}
________
- 10,9,8,7
class check
{
public static void main (String ar[])
{
for(int I=10;I>=1;I--)
System.out.print(I+" ") ;
}
}
__________
- 1,2,4,7,11
class check
{
public static void main (String ar[])
{
int d=1;
for(int I=1;I<=10;I++)
{
System.out.print(d+" ") ;
d+=I;
}
}
}