Question: Write a program c++ that fills an array, called List, with 20 random generated integers, each integer should be in the range 10 to 30
Write a program c++ that fills an array, called List, with 20 random generated integers, each integer should be in the range 10 to 30 (10 points). Then the program should do each of the following:
Output the content of List, each five integers on a line, in the following format: (15 points)
List: [
15-10-25-18-12
13-17-20-15-17
10-11-30-12-17
28-20-11-15-30
]
An array is called balanced if it stores the same count of even and odd integers. Call a function to check if the array List is balanced or not. (15 points)
- Output the sum of the first and last integer stored in the array List. (10 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
