Computer Science, asked by punamdevi2461, 1 year ago

To display the series-1,3,6,10, 100 times

Answers

Answered by BlazingNinja
1
The difference between the 1st and 2nd numbers are 2, and it keeps on increasing by 1 after every other loop.

int i=1;
int c=2;
print i;
for(i=2; i<=100; i++)
{
print i+c;
c++;
}

that might do the work.
Similar questions