please give code for this 1 2 4 7 11 16
Answer Posted / sai
#include<stdio.h>
#include<conio.h>
void main()
{
int s=1,i,n;
printf("enter a number
");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
s=s+i;
printf("%3d",s);
}
getch;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which is the memory area not included in C program? give the reason
What does struct node * mean?
What is the newline escape sequence?
How do I get an accurate error status return from system on ms-dos?
What is cohesion in c?
Write a program of prime number using recursion.
Is null a keyword in c?
What is the total generic pointer type?
What are the types of functions in c?
What does sizeof int return?
Is there any data type in c with variable size?
Give basis knowledge of web designing ...
What are the salient features of c languages?
Is python a c language?
What is a volatile keyword in c?