C program to add n numbers 
#include<stdio.h> 
//#include<conio.h> 
int main() 
{ 
int n, sum = 0, c, value; 
printf("Enter the number of integers you want to addn"); 
scanf("%d", &n); 
printf("Enter %d integersn",n); 
for (c = 1; c <= n; c++) 
{ 
scanf("%d", &value); 
sum = sum + value; 
} 
printf("Sum of entered integers = %dn",sum); 
return 0; 
} 
Output of program:

C program to add n numbers

  • 1.
    C program toadd n numbers #include<stdio.h> //#include<conio.h> int main() { int n, sum = 0, c, value; printf("Enter the number of integers you want to addn"); scanf("%d", &n); printf("Enter %d integersn",n); for (c = 1; c <= n; c++) { scanf("%d", &value); sum = sum + value; } printf("Sum of entered integers = %dn",sum); return 0; } Output of program: