integer
C2Pronunciation
UK
- /ˈɪntɪdʒə/
US
- /ˈɪntədʒər/
Description
- Whole number
- not a fraction
- positive, negative, or zero
Imagine counting on your fingers - 1, 2, 3... those are all part of this group. But what if you owe someone money? That can be shown with a negative number. And what about nothing at all? Zero belongs here too. These are whole numbers with no fractions or decimals, and they also include negative whole numbers. They show up everywhere, from temperature readings to bank account balances. You would not count 2.5 apples this way, but you could owe someone -3 dollars.
The word "integer" comes from Latin and means whole or complete. In mathematics, it means any whole number: positive, negative, or zero. You can think of it as the numbers on a number line that do not include fractions or decimals.
This means -3, -2, -1, 0, 1, 2, 3... and so on are all integers. But 1.5, 1/2, or pi are not. They are not whole numbers.
These numbers are not just ideas from math class; they can describe real things. A temperature of -5 degrees Celsius is one example. Having $10 in your bank account can be shown with 10. Losing 7 points in a game can be shown with -7.
In computer science, an integer is also a basic data type used to store whole numbers. It is important in many calculations and programs. You may not think about this word every day, but this kind of number appears in many parts of daily life, from counting items to tracking scores and money.
Examples
- 1
Math answer
The answer must be an integer, not a fraction.
- 2
Positive numbers
Choose any positive integer between 1 and 10.
- 3
User input
The program asks the user to enter an integer before it continues.
- 4
Division result
If you divide 7 by 2, the result is not an integer.
- 5
Rounding
Round the final score to the nearest integer.
Phrase
round to the nearest integer
change a number to the closest integer
Forms and spellings
2 forms open this card.
Main spelling
- integernoun
Forms
- integerspluralnoun