Question: solve using C++ program Note: If coding in Cat, use the STL String class for the problems involving strings. Do not use C style strings.
Note: If coding in Cat, use the STL String class for the problems involving strings. Do not use C style strings. Section One-Choose two problems. 1. Your friend is suspicious that the hard drive he just bought for his computer said IEB on the box, but when he plugged it into his computer the operating system says it only has 931P8 of space. That's because hard drive marketing uses base-10 to calculate space, but computer science and operating systems) use base-2 (and always have). So, using base-10,1 Babyte (E8) would be 2018 (1,000,000,000,000,000,000) bytes, but in base-2 it would be 26 (1,182,921, 54,626,846,976) bytes. Most humans use base-10 when counting, so there that's the confusion Write a program that will take storage space given in base-10 and convert it to base-2 using the tables below for reference 300 MB 300 Base-10 units) Base-2 (Binary 8 - 1 Byto 1 1000 B = 1 Kilobyte) 10046 1000 KB 1 Megabyte (MS) = Mobile 1000 MB - Gigabyte (GB) 1 1000 GB -1 Terabyte) byte ( 1000T = 1 Petabyte PD Pebbyr 1000 PS = 1 Exabyte) 14 = 1 1000 1 Zabyte Input from the keyboard the computer hard drive site as a whole integer a space, then a 2-letter size code reported in base-10 Sl units from the marketing text on the box. Output to the screen the converted size given in base 10 to base 2 units which will be reported in the operating system, rounded to the nearest 2 decimal places in the largest binary site you can express a whole number in (For example, do not write 1030 MiB, write 1.01 GIB). Finally, ask the user if he/she wishes to run the program again (check case). Refer to the sample output below. Sample Run: Enter the hard drive size: 1 TB COSC 2425 522 The corresponding binary drive size: 931.32 GiB Run again (Y/N): Y Enter the hard drive size: 752 MB The corresponding binary drive size: 717.16 MB Run again (Y/N): N Name the program: StoreConversion.cppor Store Conversion.java, where xx are your initials
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
