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 are the different types of control structures in programming?
Is using exit() the same as using return?
When we use void main and int main?
can anyone please tell about the nested interrupts?
Is a house a shell structure?
write a program in c language to print your bio-data on the screen by using functions.
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
What is the symbol indicated the c-preprocessor?
Explain the properties of union.
What is the best way to store flag values in a program?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Explain the use of #pragma exit?
How do you construct an increment statement or decrement statement in C?
What is structure packing in c?