Step Into Labs

Step Into C · Lesson 4 · Control Flow

Making Decisions

Reading input, if / else, truthiness, switch and the ternary operator.

Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

Programs get more interesting when they react to input. scanf reads formatted input from stdin (standard input). In this IDE, stdin is the Input tab of the console.

In this lesson

Missions

  1. Even or odd
  2. Sign of a number
  3. Switch it up
  4. The ternary