Chapter Overview
Learn what we'll be covering in this chapter.
“Natural selection will not remove ignorance from future generations.”
In this chapter, we’ll learn about different data types, the concept of typecasting, various C++ operators, and the selection statements. But more importantly, in this lesson, we’ll get hands-on experience with problem-solving techniques by building the logic and writing different programs using an incremental approach. We’ll do this by starting with the most basic and straightforward solution and then trying to optimize it. We’ll end the chapter by making a small Rock, Paper, Scissors game.
We’ll be learning the following basic constructs in this chapter:
- Standard input/output (
cin
andcout
) - Selection statements (
if
,if-else
,switch
) - Deeper understanding of the
while
/for
loop - Mathematical expressions
- Variables
- GDB for program execution
Let’s get started!