Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the difference between integers and floating point numbers?
What is the difference between integers and floating point numbers?

Integers refer to positive integers, negative integers and zero, such as -6, 0, 32, etc.

Floating point numbers refer to rational numbers with limited decimal places, such as -10.8, 0.00, 25.01, etc.

An integer can be either an integer or a floating point number. For example, 255 is an integer and 255.0 is a floating point number.

For integer operations, the result is an integer, and the decimal part in the calculation result will be ignored. For example: when using integer operations, 100÷3=33.

For floating point operations, the result is a floating point number, and the decimal part of the calculation result will be retained.