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
What are enumerated types?
Where are some collections of useful code fragments and examples?
Explain two-dimensional array.
What are two dimensional arrays alternatively called as?
what is the role you expect in software industry?
What is multidimensional arrays
How can I read/write structures from/to data files?
What is pass by reference in c?
What is auto keyword in c?
What is context in c?
Is printf a keyword?
What is scope rule of function in c?
What are the __date__ and __time__ preprocessor commands?
given post order,in order construct the corresponding binary tree
Explain high-order and low-order bytes.