Question: With this program it needs to be seperated into a .h file and a .cpp file. Example given below. Done in c programming please along

With this program it needs to be seperated into a .h file and a .cpp file. Example given below.

Done in c programming please along with a output screenshot of it working.
You should complete the above program under the name of a project COMP2650_Lab05_UWinID that firstly outputs a menu of commands as follows: Enter the command number: 0) Exit 1) Addition in signed-magnitude 2) Subtraction in signed-magnitude Based on the user's chosen number of commands, the program should then ask for the two inputs. After that, the program asks to what base the user wants to see the results. Then, it applies the command and prints out the result in the requested base. For instance, if a user selects (1), the program should accept two inputs as follows: Enter the first binary number: x0 = xl = x7 = Enter the second binary number: yo = yl = y7 = When the user enters the two binary numbers, the program asks for a base number to print out the result: Enter the output base: 1) Binary 2) Octal 3) Decimal 4) Hexadecimal Then the program applies the 1) Addition in signed-magnitude command on the input x and y and prints the result on the selected base and comes back to the main menu. Other commands should follow the same flow. If the user selects (0), the program ends. Please restrict the user to enter inputs within the range {0,1}. For instance, if the user enters 2,-1, ..., print out an error message and come back to ask for correct inputs. Also, print an error/warning message whether an overflow happened during the arithmetic. It is required to write a modular program. arithmetic.h void func_signed_mag_addition(int a[], int b[], int result[]); void func_signed_mag subtraction(int a[], int b[], int result[]); arithmetic.cpp #define MAX 8//Byte = 8 bits void func_signed_mag_addition(int a[], int b[], int result[]){...} void func_signed_mag_subtraction(int a[], int b[], int result[]){...} You should complete the above program under the name of a project COMP2650_Lab05_UWinID that firstly outputs a menu of commands as follows: Enter the command number: 0) Exit 1) Addition in signed-magnitude 2) Subtraction in signed-magnitude Based on the user's chosen number of commands, the program should then ask for the two inputs. After that, the program asks to what base the user wants to see the results. Then, it applies the command and prints out the result in the requested base. For instance, if a user selects (1), the program should accept two inputs as follows: Enter the first binary number: x0 = xl = x7 = Enter the second binary number: yo = yl = y7 = When the user enters the two binary numbers, the program asks for a base number to print out the result: Enter the output base: 1) Binary 2) Octal 3) Decimal 4) Hexadecimal Then the program applies the 1) Addition in signed-magnitude command on the input x and y and prints the result on the selected base and comes back to the main menu. Other commands should follow the same flow. If the user selects (0), the program ends. Please restrict the user to enter inputs within the range {0,1}. For instance, if the user enters 2,-1, ..., print out an error message and come back to ask for correct inputs. Also, print an error/warning message whether an overflow happened during the arithmetic. It is required to write a modular program. arithmetic.h void func_signed_mag_addition(int a[], int b[], int result[]); void func_signed_mag subtraction(int a[], int b[], int result[]); arithmetic.cpp #define MAX 8//Byte = 8 bits void func_signed_mag_addition(int a[], int b[], int result[]){...} void func_signed_mag_subtraction(int a[], int b[], int result[]){...}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
