Question: Given the advertised capacity in terms of numeric value, unit prefix, and bits or bytes; display (1) the given capacity, advertised bits , and advertised
Given the advertised capacity in terms of numeric value, unit prefix, and bits or bytes; display (1) the given capacity, advertised bits , and advertised bytes, (2) the given capacity binary unit capacity, bits, and bytes, and (3) the percentage of storage in binary units when compared to the advertised values. Given are four examples with input and output that the program should give. AND YOU CANT USE IF OR WHILE STATEMENTS!

Given the advertised capacity in terms of numeric value, unit prefix, and bits or bytes; display (1) the given capacity, advertised bits, and advertised bytes, (2) the given capacity binary unit capacity, bits, and bytes, and (3) the percentage of storage in binary units when compared to the advertised values Example Execution #1: Enter the advertised capacity->500 Enter the given prefix ->G Enter the coding unit ->B Example Execution #4: Enter the advertised capacity -> 3 Enter the given prefix -> T Enter the coding unit -> B Device as advertised: Advertised bits: 4000000000000 Advertised bytes: 500000000000 Binary unit conversion: 465.66 GB Binary bits: Binary bytes: Percentage of storage expected: 93.13% Device as advertised: Advertised bits 24000000000000 Advertised bytes: 3000000000000 Binary unit conversion: Binary bits: Binary bytes: Percentage of storage expected: 90.95% 500.00 GB 3.00 TB 2.73 TB 4294967296000 536870912000 26388279066624 3298534883328 Example Execution #2: Enter the advertised capacity -> 500 Enter the given prefix ->G Enter the coding unit ->b Example Execution #5: Enter the advertised capacity -> 1000 Enter the given prefix ->M Enter the coding unit ->B Device as advertised: Advertised bits: Advertised bytes: Binary unit conversion:465.66 Gb Binary bits: Binary bytes: Percentage of storage expected: 93.13% 500.00 Gb Device as advertised: Advertised bits: Advertised bytes: Binary unit conversion:953.67 MB Binary bits: Binary bytes: Percentage of storage expected: 95.37% 1000.00 MB 500000000000 62500000000 8000000000 1000000000 536870912000 67108864000 8388608000 1048576000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
