ConceptStep · learning platform for computer science

Algorithm and sequence

C programming · Lesson

C · lesson 1 / 27

Algorithm and sequence

Observe how a sequence in the flowchart becomes a sequence of C statements executed in the same order.

1 · Observe and predict

The concept

A program moves from one statement to the next unless a control structure changes the flow.

Mental model:

START → output 1 → output 2 → END

2 · Flowchart First

Follow the same algorithm as a flowchart

Use Start and Step: when the active block changes, ConceptStep also highlights the C lines representing that same step.

Loading flowchart…
3 · Flowchart ↔ C · Run in Page

Lab 1 — Run the example program

Run C executes only the example shown on the left, using stdin on the right. The coding challenge below has a separate editor and test button.

Two-output sequence Start the flowchart to synchronize the code
                        1#include <stdio.h>
                        2 
                        3int main(void)
                        4{
                        5    printf("Prima istruzione\n");
                        6    printf("Seconda istruzione\n");
                        7    return 0;
                        8}
Ready. Make a prediction before running.

                    
                

Lab 2 — Coding challenge: write your code — Instruction order

Read a number and print double then triple on two lines.

This is a different program from lab 1. Complete the starter code: Check all test cases compiles this editor and tests every input, including boundary cases.

4 · Guided practice

Check your prediction

Which message is printed first?

Challenge 1 / 5 · Understanding

Progress: 0 / 5 · correct: 0

Your competency map

What you need to know for Algorithm and sequence

ConceptStep separates what is required from what is recommended or useful as reinforcement. Only required prerequisites block your progress.

You can start right away. This is a foundation module: it does not require earlier skills from the learning path.
GUIDED LEARNING PATHS

Want to choose the next skill to develop?