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:

  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:
  1. Output an error message.
  2. Allow the user to re-input
  3. 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

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!