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
how could explain about job profile
What is the difference between text and binary i/o?
Is malloc memset faster than calloc?
Why do we need a structure?
Why is c called a mid-level programming language?
When can you use a pointer with a function?
What is the collection of communication lines and routers called?
What is a macro?
Subtract Two Number Without Using Subtraction Operator
How to set file pointer to beginning c?
What is the difference between scanf and fscanf?
Explain what are the advantages and disadvantages of a heap?
Did c have any year 2000 problems?
Is swift based on c?
#include