Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: Algorithm.

EDITTask 6 of 21 · step 4: An algorithm as a sequence of statementsPrint the algorithm step by step
Print the algorithm step by step in practice/01/

After "Hello, world!" add an empty line and the steps of the average algorithm, each in its own printf.

Checklist

  • Every task is one commit with a clear message.
Details & hint

A C program is a sequence: statements run one after another, top to bottom. printf("\n"); prints only a new line, so an empty line appears in the output.

Try it: swap two printf lines and run. The steps are printed in the order they are written. Then put them back.

practice 01 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p01_hello main.c)