please give code for this 1 2 4 7 11 16

Answer Posted / aditya

#include<stdio.h>
int main()
{
int fir=1,nex=0;
for(nex=0;nex<6;nex++)
{fir=fir+nex;
printf("%d ",fir);

}}

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

654


what is a function method?give example?

1912


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

1906


What is f'n in math?

619


What is dangling pointer in c?

618






program for reversing a selected line word by word when multiple lines are given without using strrev

1945


What is the difference between formatted&unformatted i/o functions?

614


What kind of structure is a house?

554


What are near, far and huge pointers?

644


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1599


What are the features of c languages?

625


Write a code to generate a series where the next element is the sum of last k terms.

732


Why is main function so important?

613


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

579


how logic is used

1497