Question: Write a C program that asks the user to enter 10 int values. The program should store the values in to a 10-element int array.

Write a C program that asks the user to enter 10 int values. The program should store the values in to a 10-element int array. Then the program should use a loop to go through each of the 10 elements and print the element number and the value of the element ONLY IF THE VALUE IS AN EVEN NUMBER. E.g., if the user enters the values 4, 18, 27, 32, 17, 89, 44, 83, 22, and 100, the program input and output would be: Please enter #1: 4 Please enter #2: 18 Please enter #3: 27 Please enter #4: 32 Please enter #5: 17 Please enter #6: 89 Please enter #7: 44 Please enter #8: 83 Please enter #9: 22 Please enter #10: 100 Element Value 0 4 1 18 3 32 6 44 8 22 9 100 To determine if a number is even, use the modulus operator (%). If the remainder after dividing by 2 is 0, the number is even.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!