Question: Instructions: Write a C++ program that will input from the console screen: A whole number A unit of measurement from the following set: {TB, GB,
Instructions: Write a C++ program that will input from the console screen:
- A whole number
- 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:
- A blank space will separate the whole number from the unit of measurement.
- If the user does not input an appropriate unit of measurement:
- Output an error message.
- Allow the user to re-input
- For this exercise assume that the base is 1024 (not 1000). Kilobyte Reference: https://en.wikipedia.org/wiki/Kilobyte
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
