Structural Programming

Exercise 1


1. Development Environment

For writing programs, development environments are often used. The process of writing a program is as follows:

The development environment consists of multiple programs that facilitate the overall development of a program:

1.1. Integrated Development Environments (IDE)

All these elements of the development environment are integrated into Integrated Development Environments (IDEs). An example of an IDE used in this course is CLion.

2. CLion (installation, license, first program)

The video tutorial (available at this link) demonstrates the following:

3. Homework Tasks

Below are several tasks that you should try to complete at home. By completing them, you will be prepared for successful work in the upcoming laboratory exercises.

3.1 Task 1

Try to create a new project with a .cpp file and enter the following program text:

#include<iostream>
using namespace std;

int main () {
    cout << "Hello, how are you?" << endl;
    return 0;
}

If you made a mistake while typing the text, correct it and execute it again. Intentionally introduce an error into the text.

Execute it again!

What happens now?

3.2. Task 2

In the program text, add the marked line:

#include<iostream>
using namespace std;

int main () {
    cout << ""Hello, how are you?" << endl;
    // Add this line
    cout << "Is something bothering you?" << endl;
    return 0;
}

What is the result of execution now?