Answered step by step
Verified Expert Solution
Question
1 Approved Answer
language- C++ Write a program that will input a single integer value (all input will be exactly 8 digits long) and will store pairs of
language- C++
Write a program that will input a single integer value (all input will be exactly 8 digits long) and will store pairs of digits as individual integer values. The program will display the four 2-digit numbers as well as the average of these, each on their own line. Finally, use a switch statement to print out Grade: and then either A (>=90), B ([80..89]), C ([70..79]), D ([60..69]) or F (<60) based on the calculated average.
example Sample :
Input: 54861398
Output:
54
86
13
98
Avg: 62.75
Grade: D
Sample
Input: 64536785
Output:
64
92
67
85
Avg: 77.00
Grade: D
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started