Topic: Array covered in Chapter 7 Do not use any topic not covered in lecture. Write a C++ program to store and process an integer array. The program creates an array (numbers) of integers that can store up to 10 numbers. The program then asks the user to enter up to a maximum of 10 numbers, or enter 999 if there are less than 10 numbers. The program should store the numbers in the array. Then the program goes through the array to display all even (divisible by 2) numbers in the array that are entered by the user. Then the program goes through the array to display all odd (not divisible by 2) numbers in the array that are entered by the user. At the end, the program displays the total sum of all numbers that are entered by the user.
Topic: Array covered in Chapter 7
Do not use any topic not covered in lecture.
Write a C++
The program creates an array (numbers) of integers that can store up to 10 numbers. The program then asks the user to enter up to a maximum of 10 numbers, or enter 999 if there are less than 10 numbers. The program should store the numbers in the array.
Then the program goes through the array to display all even (divisible by 2) numbers in the array that are entered by the user.
Then the program goes through the array to display all odd (not divisible by 2) numbers in the array that are entered by the user.
At the end, the program displays the total sum of all numbers that are entered by the user.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images