09 Control Structures and Flowcharts.pptx - Topic 9 Control Structures and Flowcharts 1 Control Structures The C language is a structured programming

09 Control Structures and Flowcharts.pptx - Topic 9 Control...

This preview shows page 1 - 7 out of 15 pages.

Topic 9 Control Structures and Flowcharts 1
Image of page 1
Control Structures The C language is a structured programming language which uses the concept of control structures. Control structures determine the flow of execution or control flow in a program. There are 3 control structures in structured programming: Sequence Selection Repetition 2
Image of page 2
Control Structures For the sequence control structure , the statements are executed one after another in the sequence they appear. Example: 3 int n; cout << "Enter n: "; cin >> n; int n_squared = n * n; cout << "n x n = " << n_squared << endl;
Image of page 3
Control Structures For the sequence control structure , the statements are executed one after another in the sequence they appear. Example: 4 int n; cout << "Enter n: "; cin >> n; int n_squared = n * n; cout << "n x n = " << n_squared << endl;
Image of page 4
Control Structures For the sequence control structure , the statements are executed one after another in the sequence they appear. Example: 5 int n; cout << "Enter n: "; cin >> n; int n_squared = n * n; cout << "n x n = " << n_squared << endl;
Image of page 5
Control Structures For the
Image of page 6
Image of page 7

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture