Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What should be the thinking algorithm of dividing two large numbers in a calculator with C++?
What should be the thinking algorithm of dividing two large numbers in a calculator with C++?
Let's assume that both numbers are integers. When input, it is stored as a string, the length is calculated, the difference is several orders of magnitude, and then it is passed to the plastic array, whether it is dynamic or static.

Then align to the left and add 0 to the short number to make it the same order of magnitude. Save the calculation results to another array. How many orders of magnitude? In fact, it is to locate the decimal point when outputting an array or a linked list and handle the output position of the decimal point. You got it? Use arrays instead of individual variables.

It's just that the division of the numbers stored in the design array here is more brain-consuming. I haven't done it before, and I only have this idea.

If you can't find it, go to another party. I am also learning about this thing, and I will always pay attention to it.