Question: You need three files Winput file //command line file .cpp l/output file *linux compiler /*program will read from an input file perform conversion and then

 You need three files Winput file //command line file .cpp l/output
file *linux compiler /*program will read from an input file perform conversion

You need three files Winput file //command line file .cpp l/output file *linux compiler /*program will read from an input file perform conversion and then print in an output file*/ Write a C++ that converts a rational, decimal number to a corresponding value in a foreign base. A foreign base, is constrained to the range 2SS36 Th e program should only cover the basic things we have covered in class. i.e only chapter one and two of the computer organization one class. So use the basic divide and multiplicand to do conversion I/po1.cpp p01.cpp contains functions that process command line arguments and direct the process of reading printing original input values together with corresponding output values 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 p01 are shown below. Boldfaced type indicates data entered at the keyboard by the user , converting, and Enter the input file name: i01.dat Enter the output file name: o01.dat S p01 i01.dat Enter the output file name: 001.dat /input file The input file contains pairs on separate lines. The first value in the pair is a rational, decimal number. The second value in the pair is an integer specifying the foreign base where 2-f-36 As an example, consider the following pairs: 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

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!