In particular, zero is also an integer, but it is not positive nor negative. An integer is a rational number with no "fraction", or part. An integer is a decimal number with all zeros after the decimal separator. For example, the integer 17 is the same as the decimal 17.0 or 17.0000.
An integer has a next smaller number and a next larger number. There is no smallest integer, and there is no largest integer. Each integer is either larger than, equal to, or smaller than any other integer. Consecutive integers are integers that come after each other (as in ).
The sum of integers is an integer. The difference between integers is an integer. The product of integers is an integer (for example, (12 + 2345 x (67 - 8) ) x 9 is an integer). An integer divided by an integer is sometimes not an integer (for example, 1/2).
To sum up, an integer is a whole number that has no decimals.
In programming[change | change source]
Notes[change | change source]
- Negative numbers have a minus (−) in front of the number. Positive numbers have no sign or a plus (+) sign in front. Zero usually has no sign.
- "Comprehensive List of Algebra Symbols". Math Vault. 2020-03-25. Retrieved 2020-08-11.
- Weisstein, Eric W. "Integer". mathworld.wolfram.com. Retrieved 2020-08-11.