Computer Science, asked by AdityaNirupam, 1 year ago

Print the following series with for loop
1,2,4,7,11...........first 10terms

Answers

Answered by PriyanshSinha
11
class series
{ public static void main( )
{
int a =1,c=1;
for (int i =1 ;i<=10;i++)
{System.out.print( a +",");
a= a+c;
c++;
}
}
}
Similar questions