Question: ***Please put comments and try to make it as simple as possible. Will give good ratings. Thank you*** Instructions: Write a C++ program that will
***Please put comments and try to make it as simple as possible. Will give good ratings. Thank you***
Instructions: Write a C++ program that will input from the console screen:
1. A whole number
2. A unit of measurement from the following set: {TB, GB, MB, KB, B}
The program will output the equivalent number of bits. Allow users to continue to input until they indicate that they want to stop.

Notes:
1. A blank space will separate the whole number from the unit of measurement.
2. If the user does not input an appropriate unit of measurement:
a. Output an error message.
b. Allow the user to re-input
3. For this exercise assume that the base is 1024 (not 1000). Kilobyte Reference:
Sample Run: Input a whole number followed by a unit of measurement (TB, GB, MB, KB, B) Example: 1 KB 1 kb Input a valid whole number and unit of measurement Input a whole number followed by a unit of measurement (TB, GB, MB, KB, B) Example: 1 KB 2 KB 16384 b Do wish to do another conuersion? Type Y or y to continue. Input a whole number followed by a unit of measurement (TB, GB, MB, KB, B) Example: 1 KB 1 TB 8796093022208 b Do wish to do another conuersion? Type Y or y to continue. Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
