Question: Design a solution and write its C++ code by using switch-case statements . It takes an integer argument and checks if it is a positive

Design a solution and write its C++ code by using switch-case statements. It takes an integer argument and checks if it is a positive integer. In case of a zero or negative input it displays an error message. In case of a positive input it displays following output:

A if the input is between 1 and 30 (1 and 5 included)

B if the input is between 31 and 70 (3 and 7 included)

C if the input is between 71 and 100 (71 included)

D if the input is between 100 and 150 (100 and 150 included)

F if the input is greater than 150.

Keep your code commented and indented for ease of reading. Paste your commented codes in the solution and also add a clear screen shot of outcome in your solution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!