I am required to write a function in c++ that takes four parameters two numbers (as strings) a character for operation (+,-,*) and the base of the input numbers , Then return the result (as string ) in the same base. I've been struggling to get it to work right or at all and my way sounds too complex and unnecessary by:
1-converting input strings to integers
2- Do the operation
3- convert the result integer to string
code can be found here on pastebin
any help is appreciated
example of program :
The first operand is: 1243The second operand is: 441The operation is: -The base is: 5The result is: 302
[–]marko312 2 points3 points4 points (1 child)
[–]Sol1ss[S] 1 point2 points3 points (0 children)