please give code for this 1 2 4 7 11 16
Answer Posted / yogesh sharma
Try this.
#include<stdio.h>
void main()
{
int a=1,b,i=0;
while(i<=5)
{
a=a+i;
printf("%d \n",a);
i++;
}
getch();
}
| Is This Answer Correct ? | 98 Yes | 51 No |
Post New Answer View All Answers
What is %d called in c?
write a program to copy the string using switch case?
Apart from dennis ritchie who the other person who contributed in design of c language.
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What is the general form of function in c?
Why c is called procedure oriented language?
Do pointers need to be initialized?
Why c is called object oriented language?
Differentiate between #include<...> and #include '...'
What is sizeof int in c?
Do variables need to be initialized?
What is define c?
write a progrmm in c language take user interface generate table using for loop?
What is a stream in c programming?
What is the difference between far and near ?