Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are enumerated types?

1168


Where are some collections of useful code fragments and examples?

1146


Explain two-dimensional array.

1040


What are two dimensional arrays alternatively called as?

1165


what is the role you expect in software industry?

2135


What is multidimensional arrays

1109


How can I read/write structures from/to data files?

955


What is pass by reference in c?

1171


What is auto keyword in c?

1191


What is context in c?

912


Is printf a keyword?

1187


What is scope rule of function in c?

1074


What are the __date__ and __time__ preprocessor commands?

1092


given post order,in order construct the corresponding binary tree

2763


Explain high-order and low-order bytes.

1085