Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the result of dividing a floating-point data by an integer?
What is the result of dividing a floating-point data by an integer?
Because you define both t and n as integers, an integer divided by an integer can only be an integer. Even if the result t is defined as a floating-point type, it will only get an integer with 0 digits after the decimal point. In the second loop, t is equal to 0.000000, and it will jump out of the loop.