InterviewSolution
Saved Bookmarks
| 1. |
Print sum of n arrays |
|
Answer» C program to calculate sum of n numbers USING an arrayint MAIN() { int n, sum = 0, c, ARRAY[100];scanf("%d", &n);for (c = 0; c < n; c++) { scanf("%d", &array[c]); sum = sum + array[c]; }printf("Sum = %d\n", sum);RETURN 0; }Explanation:I think it HELP you |
|