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 / yogesh sharma

Try this.

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

Is This Answer Correct ?    98 Yes 51 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is fortran still used in 2018?

1094


Can you apply link and association interchangeably?

1176


How can you tell whether a program was compiled using c versus c++?

1161


Where is c used?

1154


What is union and structure in c?

1286


What is action and transformation in spark?

1227


What is wrong with this declaration?

1156


Explain what is the benefit of using enum to declare a constant?

1131


what is the function of pragma directive in c?

1179


Explain heap and queue.

1142


What is a scope resolution operator in c?

1328


Explain modulus operator. What are the restrictions of a modulus operator?

1058


How does pointer work in c?

1194


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

2402


What is #ifdef ? What is its application?

1165