Question: please use c++ and input and output i have please Computer Organization CMSC 2833 Foreign Base to Decimal Project poi Project: Program poi converts a

please use c++ and input and output i have please
please use c++ and input and output i have please Computer Organization
CMSC 2833 Foreign Base to Decimal Project poi Project: Program poi converts

Computer Organization CMSC 2833 Foreign Base to Decimal Project poi Project: Program poi converts a positive, rational, number in a foreign base to a corresponding decimal value. A foreign base, f is constrained to the range 2 sf S 36. Partners: Submit this project with your partner. Partners submit this project using the poi Project Template docx for students with a partner. If you do not have a partner submit this project using the poi Project Template docx for students without a partner. Program Files: Project 1 consists of ille poi.cpp File Description * p01.cpp File p01.cpp.contains functions that process command line arguments and direct the process of reading, converting. and printing original input values together with Project file corresponding output values Project files must be stored in the root directory of your student account. directory: Failure to store project files in the root directory of your student account will result in a score of zero (O) for this project. Command Line: Project 1 can be invoked with zero, one, or two program parameters. The first program parameter is the input file name. The second parameter is the output file name. Sample command lines together with corresponding actions by program poi are shown below. Boldfaced type indicates data entered at the keyboard by the user, Sp01 Enter the input file name: 101.dat Enter the output file name: 001.dat SPO1 101.dat Enter the output file name: 001.dat Sp01 101.dat 001. dat The input file contains pairs. The first value in the pair is a rational number in a foreign base. Digits in the first value are case insensitive - a lower case a' has the same value as an upper case 'A'. The second value in the pair is an Integer specifying the foreign bases, where 25 / 536. As an example, consider the following pairs: TEST. I 36 laura.a 36 31.224 Input File Errors: Your project must account for errors in the input file. 1. Your project must detect and report an input file containing an odd number of values 2. Your project must detect and report an invalid input value to be converted, 3. Your project must detect and report an invalid foreign base. Input File: ganization Foreign Base to Decimal Project p01 One line is printed for each pair in the input file. Three values are printed on a line. The first two values are the values read from the input file. The last value is the decimal equivalent of the input values. Each line is formatted. Three values are printed on each line. 1. The first value is the original number in a foreign base. The number is printed, right-justified, in a field of twenty (20) spaces. 2. A single space is printed after the first value. 3. The second value is the foreign base. The foreign base is printed, right-justified, in a field of two (2) spaces. 4. A single space is printed after the second value. S. The third value is the decimal equivalent of the original value in a foreign base. It is printed, right justified in a field of twenty (20) spaces. Five (5) fractional digits are printed. Example: TEST.I 36 1372205.50000 laura.a 36 35778358.27778 31.22 4 13.62500

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!