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 are header files in c programming?

1137


Write a program to check palindrome number in c programming?

1022


Is flag a keyword in c?

1156


What do the functions atoi(), itoa() and gcvt() do?

1194


What is size of union in c?

1026


Between macros and functions,which is better to use and why?

2228


What is the purpose of & in scanf?

1078


State the difference between x3 and x[3].

1112


In a switch statement, what will happen if a break statement is omitted?

1067


Which node is more powerful and can handle local information processing or graphics processing?

1324


What is meant by keywords in c?

1071


What is volatile variable how do you declare it?

1103


Explain what are multibyte characters?

1200


How can a process change an environment variable in its caller?

1190


Compare interpreters and compilers.

1066