How would one go about getting C++ to round a number such as 15511210043330986055303168 to something like 15511210043330986000000000?
I keep getting questions on homeworks where the expected outputs are some number that ends in 00000000000 and I always seem to come up with something that ends with a bunch of numbers and no zeros at the end.
Set up a loop with N decimal places iterations, then add the arrays
Array3[N] = Array1[N] + Array2[N]
Then have a loop that goes through Array3's elements and if any are greater than 10 perform another operation. Subtract 10 from that element and add 1 to the element in the higher decimal place bracket.
I think regardless of the type of operation you want to do you would have to use an array of some sort. What exactly are you trying to do with numbers these large anyways? Answering that question might help guide you to a solution.