Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions