please give code for this 1 2 4 7 11 16
Answer Posted / ashish tiwari
#include<stdio.h>
#include<conio.h>
void main()
{
int p=1,i;
for(i=1;i<=6;i++)
{
printf("%d ",p);
p+=i;
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
What is the difference between c and python?
Why does everyone say not to use gets?
What are the rules for identifiers in c?
What are control structures? What are the different types?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Is c procedural or object oriented?
Differentiate between ordinary variable and pointer in c.
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What does calloc stand for?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What is #define?
How can I open a file so that other programs can update it at the same time?
What is the size of structure in c?
What is abstract data structure in c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.