freeCodeCamp/guide/english/mathematics/whole-numbers-and-integers/index.md

1.1 KiB

title
Whole Numbers and Integers

Whole Numbers and Integers

Whole Numbers

All positive numbers, including zero, that do not have a fractional or decimal part. Numbers starting from 1, 2, 3, and so on... are called counting numbers or natural numbers.

Examples: 0, 8, 512, 36535

Whole numbers are usually taken for granted due to their trivial nature. But, our entire understanding of mathematics rest on the understanding the concept of Whole numbers and counting.

Using the Whole numbers we are able to count, add, subtract, multiply, and hence, be able to perform all other mathematical functions. You can form Integers, Rational, Irrational, and Real numbers using whole numbers.

Integers

An integer has all the properties of a whole number, mentioned above. Additionally, an integer can be negative.

All whole numbers are integers.

Examples: -23, -11, 0, 12, 7129

An integer is negative if, it has a - sign preceding it. You can convert any real number to an integer by the process of rounding.