(C++) Let's get acquainted!


“The ability to program has become the fourth component of literacy. Everyone needs to know how our digital world works, not just engineers, ”
- said Mark Serman, executive director of the Mozilla Foundation.

Programming. Why study if there are many ready-made programs for computers? Yes, there are really many ready-made programs. But as practice shows, there are always tasks that are not solved by standard means. In this case, you have to create your own (or modify the existing) program.

And yet you can say that programming is not for you, that you are inclined to the humanities. So why all the same is it needed?
Firstly, we live in the age of information technology. Computer technology surrounds us everywhere. Knowing how it works is just useful.
Secondly, learning programming helps people think abstractly and divide the task into small parts.

Our courses will allow you to step-by-step learn programming from basic skills to solving complex problems.

This course is devoted to the study of the most popular programming language - the C++ language. Many modern languages are C-like. Therefore, having studied this programming language, you can easily learn any other.

Working with the course you will gradually develop your skills. Starting with the basics of programming, you will soon be able to bring your skills to perfection by solving complex tasks. To learn the basics of programming, you may not have any specialized software. Enough to have the Internet and your desire for learning.

The training interface consists of several parts.
  1. On the left is the code editor in which you have to work.
  2. On the right is the window for displaying the result of the program.
  3. And at the bottom there are tasks and control buttons.
If you are ready to learn how to program easily and freely, then start completing tasks!

In the previous task, you had to completely record the program from scratch. It was the first type of task.

The second type of task is the task of editing an existing program.

The last type of tasks are ordinary test tasks, in which you just need to attach the file with the program or give a simple answer - as in the usual tests of our system.

In the process of studying theoretical material, most of the tasks will be of the second type.
Let's practice.
 

Compiler - is a computer program that translates source code from a high-level programming language to a low-level programming language

You will work with the online compiler, record or edit the program in a special window on the screen.
Also, You needed a compiler on a working computer.
To learn the C ++ programming language, we recommend installing the DevC ++ compiler (you can download it from the official site - it's freeware). 
You can use other C++ compilers if you wish.

The simplest C++ program consists of only 8 characters:
int main()
{
  return 0;
}
Explain each character in the program:
int main: the main function that starts a programme is always called main. The word int indicates the type of value to be returned (integer).
return 0: when your main function terminates, it returns a status code to the operating system, which is checked to determine if your application was functioning normally. A value of 0 indicates "all ok, normal output", any other value is usually an error code.

Moreover, the C++ programming language distinguishes between capital and small letters.

() - Empty brackets mean that main has no arguments.
{} - Curly brackets indicate the beginning and end of the main program. All actions that must be performed are written inside curly brackets.

What does our program do?
Since there is nothing inside the curly braces, our program does nothing, it simply complies with the rules of the C++ language, it can be compiled and an exe-file can be obtained - an executable file that can be launched for execution.