please give code for this 1 2 4 7 11 16

Answer Posted / santhoshreddy katam

#include<stdio.h>
#include<conio.h>
void main()
{
int a=1;
for(int i=0;i<=5;i++)
{
a=a+i;
printf("%d/n", a);
getch();
}
}

Is This Answer Correct ?    36 Yes 40 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain threaded binary trees?

773


Differentiate abs() function from fabs() function.

689


What are variables c?

709


Sir i need notes for structure,functions,pointers in c language can you help me please

2032


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

701






Do you know the use of 'auto' keyword?

748


State the difference between x3 and x[3].

737


What is a ternary operator in c?

756


What are external variables in c?

651


What is difference between Structure and Unions?

742


what is a function method?give example?

2018


How variables are declared in c?

668


What is chain pointer in c?

690


Can we use any name in place of argv and argc as command line arguments?

699


In C, What is the #line used for?

1260