answersLogoWhite

0


Best Answer

As you can see, this series is the sum of the sequence: 1, 2, 3, 4, 5, 6.

That is to say:

1 + 2 = 3

3 + 3 = 4

6 + 4 = 10

10 + 5 = 15

15 + 6 = 21

To program this in C, you would want a simple incremental counter which would be added to the series sum on each iteration of the loop.

{

int c = 2;

int sum = 1;

// loop until you find all the numbers you want

while(1) {

// increase the running sum to find the next next number in the series

sum += c;

// increment our counter

++c;

}

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago
#include
main()
{
int i,j;
for(i=0;i<=3;i++)
{
for(j=1;j<=i+1;j++)
printf("%d",j+i);
printf(" ");
}
printf("\n");
return 0;
}
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: A c program to generate a series of 1 3 6 10 15 21.?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program to swap any number?

Do write, but before you start, please explain what does swapping a number mean.


Will you give us 10 to 15 different projects of advance java so that we can study advance java?

A good program display a model of human cells, and test different mutations.


Can a series circuit have one electrical device?

No. You can have multiple devices on a series circuit. How about a low voltage Christmas tree light set. There you may have 15 or 20 lamps in series.


What is the total resistance of 15 ohms?

That depends how they are connected. For example, if they are connected in series, just add the individual resistances.


What is the resistivity of PVC?

10^15

Related questions

How to write a c program to generate 1 3 6 10 15?

You should use some sort of loop. E.g. for (i=1; i&lt;=5; ++i) printf ("%d ", i*(i+1)/2);


Can you write a program to generate sinx table where x varies from 0 to 180 in steps of 15?

Yes, I can.


When did It Had to Be You - TV series - end?

It Had to Be You - TV series - ended on 1993-10-15.


What number comes next in the series 1 6 10 13 15?

The series 1 6 10 13 15 (1+5=6; 6+4=10, 10+3=13; 13+2=15) is completed by 15+1=16. The answer is 16.


What are the release dates for Screen Snapshots Series 15 No- 10 - 1936?

Screen Snapshots Series 15 No- 10 - 1936 was released on: USA: 29 May 1936


When was Tomorrow - TV series - created?

Tomorrow - TV series - was created on 1973-10-15.


When was In View - TV series - created?

In View - TV series - was created on 1962-10-15.


When did Hometown - TV series - end?

Hometown - TV series - ended on 1985-10-15.


When did Metamorphosis - TV series - end?

Metamorphosis - TV series - ended on 2007-10-15.


When was Capri - TV series - created?

Capri - TV series - was created on 2006-10-15.


When was Fox Business - TV program - created?

Fox Business - TV program - was created on 2007-10-15.


Whot is the next number in the series 25 24 22 19 15?

25-1=24 24-2=22 22-3=19 19-4=15 15-5=10 The next number in the series is 10.