Write the program to generate the following series: 2,9,28,65,126,........... up to 10 terms
manoj1138:
tell the relation between all the numbers first
Answers
Answered by
3
In Java:-
class series{
public static void main(String[]args){
int q=1;
System.out.print(q*q*q+1);
for (q=2;q<=10;q++)
System.out.print(","+((q*q*q)+1));
}
}
class series{
public static void main(String[]args){
int q=1;
System.out.print(q*q*q+1);
for (q=2;q<=10;q++)
System.out.print(","+((q*q*q)+1));
}
}
Answered by
1
Hi friend!
here's your answer:
In Java:-
class series{
public static void main(String[]args){
int q=1;
System.out.print(q*q*q+1);
for (q=2;q<=10;q++)
System.out.print(","+((q*q*q)+1));
}
}
HOPE THIS HELPED YOU..PLEASE MARK AS BRAINLIESTT!
here's your answer:
In Java:-
class series{
public static void main(String[]args){
int q=1;
System.out.print(q*q*q+1);
for (q=2;q<=10;q++)
System.out.print(","+((q*q*q)+1));
}
}
HOPE THIS HELPED YOU..PLEASE MARK AS BRAINLIESTT!
Similar questions