write a 'c' program to sum the number of integer values
Answer Posted / chandra
#include<stdio.h>
#include<conio.h>
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 ? | 11 Yes | 5 No |
Post New Answer View All Answers
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
What is omp_num_threads?
Why can’t we compare structures?
Explain what is the use of a semicolon (;) at the end of every program statement?
How can I use a preprocessorif expression to ?
What are enumerated types?
Once I have used freopen, how can I get the original stdout (or stdin) back?
What is the use of void pointer and null pointer in c language?
Why doesnt this code work?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Explain what are multidimensional arrays?
What is c standard library?
What is difference between structure and union in c?
Differentiate between the = symbol and == symbol?
What is the c language function prototype?