To display the series-1,3,6,10, 100 times
Answers
Answered by
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.
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