please give code for this 1 2 4 7 11 16
Answer Posted / kiran
#include<stdio.h>
#include<conio.h>
void main()
{
int p=1;
for(int i=1;i<=5;i++)
{
printf("%d ",p);
p+=i;
}
getch();
}
| Is This Answer Correct ? | 35 Yes | 23 No |
Post New Answer View All Answers
Explain what is the benefit of using #define to declare a constant?
Explain bit masking in c?
Describe how arrays can be passed to a user defined function
What is the difference between union and anonymous union?
What is the difference between abs() and fabs() functions?
write an algorithm to display a square matrix.
What is array of structure in c?
Do you know the use of fflush() function?
How does free() know explain how much memory to release?
What is the difference between arrays and pointers?
What is exit() function?
What is pointer in c?
What is static volatile in c?
Which built-in library function can be used to match a patter from the string?
What is the difference between if else and switchstatement