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 ? | 97 Yes | 50 No |
Post New Answer View All Answers
define string ?
What is wrong with this initialization?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What does p mean in physics?
What is binary tree in c?
Can the curly brackets { } be used to enclose a single line of code?
What is string constants?
What are reserved words?
Why dont c comments nest?
What functions are in conio h?
What are the types of bitwise operator?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
Explain the difference between malloc() and calloc() in c?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Why is extern used in c?