There are lots of different types of numbers: integers (whole numbers without any decimal places), rational numbers, irrational numbers, complex numbers, etc. No matter how large, a computer’s amount of storage has limits. You can see that therefore it would be hard to store with 100% accuracy, a number with infinitely many decimal places such as \(\pi\text{.}\) Moreover, different types of numbers are dealt with in different ways internally and that’s why we discuss them separately. We start with whole numbers, also called integers, or int for short. Integers can be positive, negative, or zero and have no digits after the decimal point.
Up to this point, we have only printed words to the screen. In the following Codecast we’ll learn how to print numbers to the screen using the printf() statement and the format specifier for integers.