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...

Write a programe print the sum of series 0,1,2,.....10

Answer Posted / mrs.ahmer

#include<stdio.h>
#include<conio.h>
void main()
{
int c,sum;
clrscr();
c=0;
sum=0;
while(c<=10)
{
printf("%d\n",c);
sum=sum+c;
c=c+1;
}
printf("sum is %d",sum);
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1072


Explain setjmp()?

1077


How will you find a duplicate number in a array without negating the nos ?

2135


How do I swap bytes?

1079


Explain how can I open a file so that other programs can update it at the same time?

1121


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1347


Explain what happens if you free a pointer twice?

1090


When should the register modifier be used? Does it really help?

970


When is a null pointer used?

1121


What is static and volatile in c?

1226


how can f be used for both float and double arguments in printf? Are not they different types?

1073


How can I send mail from within a c program?

1034


How do you search data in a data file using random access method?

1307


Explain high-order bytes.

1121


What's a good way to check for "close enough" floating-point equality?

1168