How to write this program and using while, for or do..while only.

Given a special squence of number as follows.
1,2,3,5,8,13,21,34....
the first two numbers must be 1 and 2. The following subsequent numbers are the sum of their two producessors.Write a program in C that needs a value n in the ranfe 1 to 30 and dispalys the first n numbers of this special squence.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.