Computer Science, asked by shahad1932, 10 months ago

wap add n number in c​

Answers

Answered by harshkhandelwal51
0

Answer:

Here is the answer-

#include <stdio.h>  

int main()

{

 int n, sum = 0, c, value;

 

 printf("How many numbers you want to add?\n");

 scanf("%d", &n);

 

 printf("Enter %d integers\n", n);

 

 for (c = 1; c <= n; c++)

 {

   scanf("%d", &value);

   sum = sum + value;

 }

 

 printf("Sum of the integers = %d\n", sum);

 

 return 0;

}

Similar questions