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 does void main () mean?

1231


an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational

1312


What is void c?

1077


What are the 4 types of unions?

1034


What does stand for?

1079


What is ambagious result in C? explain with an example.

2626


Explain what is the difference between the expression '++a' and 'a++'?

1213


What is the easiest sorting method to use?

1159


What is a macro, and explain how do you use it?

1074


Explain how can I read and write comma-delimited text?

1159


Explain what is a program flowchart and explain how does it help in writing a program?

1094


What do you understand by normalization of pointers?

1058


What is the benefit of using an enum rather than a #define constant?

1232


How can you convert integers to binary or hexadecimal?

1022


Write a program to print numbers from 1 to 100 without using loop in c?

1077