C Exercises: Compute the sum of values in a given array of integers except the number 17
52. Sum Array Excluding 17
Write a C program to compute the sum of values in a given array of integers except the number 17. Return 0 if the given array has no integers.
C Code:
Sample Output:
Sum of values in the array of integers except the number 17: 46
Pictorial Presentation:
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to compute the sum of an array excluding negative numbers.
- Write a C program to sum elements of an array, ignoring any numbers divisible by 3.
- Write a C program to compute the sum of an array while excluding the maximum value.
- Write a C program to calculate the sum of an array excluding duplicate numbers.
C Programming Code Editor:
Previous: Write a C program to count even number of elements in a given array of integers.
Next: Write a C program to compute the sum of the numbers in a given array except those numbers starting with 5 followed by atleast one 6. Return 0 if the given array has no integer.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.