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 'c' program to sum the number of integer values

Answer Posted / neha shree

void main()
{
int a,n,i,sum=0;
printf("enter n value");
scanf("%d",&n);
printf("\n Enter the numbers");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
sum+=a[i];
printf("\nSum of the given numbers is %d",sum);
}

Is This Answer Correct ?    9 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pre-emptive data structure and explain it with example?

3786


How are strings stored in c?

1075


What is the size of structure in c?

1212


write a programming in c to find the sum of all elements in an array through function.

2218


Differentiate between functions getch() and getche().

1104


write a program to concatenation the string using switch case?

2143


What is scope rule of function in c?

1149


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

1159


How can I read data from data files with particular formats?

1091


What are preprocessor directives in c?

1155


What’s the special use of UNIONS?

1205


What is the benefit of using #define to declare a constant?

1146


What is self-referential structure in c programming?

1276


How do you convert strings to numbers in C?

1293


Do pointers take up memory?

1206