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 / durga bhavani

void main()
{
int a[25],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 ?    39 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does everyone say not to use gets?

1098


What is structure data type in c?

1013


What do you mean by dynamic memory allocation in c?

1098


Write a program for finding factorial of a number.

1083


What is type qualifiers?

1129


Write a program that accept anumber in words

1755


Is c still relevant?

1076


How to write a code for reverse of string without using string functions?

2136


What are structure members?

1090


What is the value of c?

1061


Why isnt there a numbered, multi-level break statement to break out

1041


How does sizeof know array size?

1111


Do pointers take up memory?

1147


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16754


What is the auto keyword good for?

1144