Chapter Overview
Learn what we’ll be covering in this chapter.
“If I have seen further, it is by standing on the shoulders of giants.”
- Isaac Newton
In this chapter, we’ll solve a simple table printing problem by incrementally learning about the following basic constructs:
- Standard input/output (
cin
andcout
) - Mathematical expressions
- Variables
- Repetition using
while
/for
loop
Using the above constructs, we will learn to create a program that prompts the user for a number and prints that number’s table up to a certain limit (as shown below).
We will also solve several exercises involving loops and practice printing several sequences.
Let’s start by writing our first C++ program!