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
Explain how can I right-justify a string?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What does sizeof function do?
What is a null string in c?
How does struct work in c?
What is the difference between text files and binary files?
Explain what does it mean when a pointer is used in an if statement?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
C language questions for civil engineering
What are the 5 organizational structures?
Explain how do you search data in a data file using random access method?
What is the use of extern in c?
What is the difference between #include and #include 'file' ?
What is bash c?