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
Is fortran still used in 2018?
Can you apply link and association interchangeably?
How can you tell whether a program was compiled using c versus c++?
Where is c used?
What is union and structure in c?
What is action and transformation in spark?
What is wrong with this declaration?
Explain what is the benefit of using enum to declare a constant?
what is the function of pragma directive in c?
Explain heap and queue.
What is a scope resolution operator in c?
Explain modulus operator. What are the restrictions of a modulus operator?
How does pointer work in c?
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is #ifdef ? What is its application?