Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m getting an error when executing the code DESCRIPTION Write a C++ program th

ID: 3744505 • Letter: I

Question

I'm getting an error when executing the code

DESCRIPTION Write a C++ program that defines the following variables » » » » count: initialized to 0; the number of valid numbers that were entered sum: initialized to 0; the sum of the valid numbers that were entered minimum: intialized to 101; the minimum of the valid numbers that were entered maximum: initialized to 0; the maximum of the valid numbers that were entered The program should then use a do-while loop to keep asking the user to enter integers between 1 and 100, an If the entered integer is -1, terminate the loop and display the count of valid integers that were entered, their minimum, their maximum, and their average (a decimal number) in a format similar to the sample outcome below If the entered integer is O, less than -1, or greater than 100, ignore the entered integer, display an error message stating that "Invalid integer; must be between 1 and 100.", and prompt the user to enter an integer again Otherwise, increment count by 1, add the entered integer to sum, assign it to minimum if it is less than minimum, and assign it to maximum if it is greater than maximum. . . The following is a sample outcome Enter an integer between 1 and 100 (-1 to terminate): 45 Enter an integer between 1 and 100 (-1 to terminate): 68

Explanation / Answer

#include using namespace std; int main() { int count = 0, sum = 0, minimum = 101, maximum = 0, num; do { cout 100) { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote