Computer Science, asked by Vishalkumardal, 1 year ago

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
manoj1138: then I will be able to tell u
Anonymous: specify the programming language in which you want the program to be written
manoj1138: I can write in Qbasic

Answers

Answered by Anonymous
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));
}
}
Answered by SresthaAbhi
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!
Similar questions