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
Why does everyone say not to use gets?
What is structure data type in c?
What do you mean by dynamic memory allocation in c?
Write a program for finding factorial of a number.
What is type qualifiers?
Write a program that accept anumber in words
Is c still relevant?
How to write a code for reverse of string without using string functions?
What are structure members?
What is the value of c?
Why isnt there a numbered, multi-level break statement to break out
How does sizeof know array size?
Do pointers take up memory?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
What is the auto keyword good for?