Ask the user to input five (5) integers between 1 to 100. If the user does not enter a number between 1 and 100, repeatedly ask for an integer value until they do or until all the 5 inputs are complete. Assume that the user will only input integers and no entry will be repeated. Then, print the array with 5 integers. Print also the highest and lowest values as well as the average of the 5 integers.
Sample Run:
Input a number: 99 //store at array[0]
Input a number: 101 //do not accept, ask for another input
Input a number: 50 //store at array[1]
Input a number: -1 //do not accept, ask for another input
Input a number: 1 //store at array[2]
Input a number: 100 //store at array[3]
Input a number: 3 //store at array[4]
5 integers between 1 to 100:
99
50
1
100
3
Highest: 100
Lowest: 1
Average: 50 //(99 + 50 + 23 + 100 + 3) / 5
Info: Needs to be a C++ Program
Answers
Answer:
Ask the user to input five (5) integers between 1 to 100. If the user does not enter a number between 1 and 100, repeatedly ask for an integer value until they do or until all the 5 inputs are complete. Assume that the user will only input integers and no entry will be repeated. Then, print the array with 5 integers. Print also the highest and lowest values as well as the average of the 5 integers.
Sample Run:
Input a number: 99 //store at array[0]
Input a number: 101 //do not accept, ask for another input
Input a number: 50 //store at array[1]
Input a number: -1 //do not accept, ask for another input
Input a number: 1 //store at array[2]
Input a number: 100 //store at array[3]
Input a number: 3 //store at array[4]
5 integers between 1 to 100:
99
50
1
100
3
Highest: 100
Lowest: 1
Average: 50 //(99 + 50 + 23 + 100 + 3) / 5
Info: Needs to be a C++ Program
Answer:
oooooo it is tooo hard Yar sorry I don't know the answer !