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

Write a program which will prompt the user to enter 10 int values each in the ra

ID: 3635796 • Letter: W

Question

Write a program which will prompt the user to enter 10 int values each in the range 0 to 9 inclusive. Next, display the 10 ints on one line, each separated by a single space[ HINT: use 'setw(2)'].

IMPORTANT: Compute the average of the 10 ints, using integer division.
On the following line, display underneath each number either a '<', '=', or '>' symbol according to these rules:
a) if the number is less than the average, print '<'.
b) if the number is equal to the average, print '='.
c) otherwise, display a '>' character.

Ensure that your program concludes by displaying "PROGRAM ENDS" followed by a single newline character.

EXAMPLES:

Enter 10 digits: 4 5 1 1 5 4 8 2 3 7
4 5 1 1 5 4 8 2 3 7
= > < < > = > < < >
PROGRAM ENDS

Enter 10 digits: 0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
< < < < = > > > > >
PROGRAM ENDS

Enter 10 digits: 2 2 2 2 2 4 4 4 4 4
2 2 2 2 2 4 4 4 4 4
< < < < < > > > > >
PROGRAM ENDS

Enter 10 digits: 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
= = = = = = = = = =
PROGRAM ENDS

Explanation / Answer

#include #inclue void main() { int a[10]; int i,sum=0,avg=0; 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