1,2,9,28,65 upto 10 terms
Answers
Answered by
2
Question:-
Write a program to print the series 1 2 9 28 65 upto 10 terms.
Program:-
This is written in Java.
class Series
{
public static void main(String args[])
{
for(int i=0;i<10;i++)
System.out.print((i*i*i*+1)+" ");
}
}
Logic:-
1 =0³+1
2=1³+1
9=2³+1
and so on.
Similar questions