Write down the value of the variable U obtained from the following program. The text of the program is given

Write down the value of the variable U obtained from the following program. The text of the program is given in the programming language.
Pascal Var u, i: integer; Beginu: = 30For i: = 1 to 6 dou: = u – i Writeln (u); End

Before entering the loop, the value u = 30;

In the program, in a loop, the value of the counter i is subtracted from the value of the u variable. The loop will run 6 times:

u = 30, i = 1, u = 30 – 1 = 29.
2.u = 29, i = 2, u = 29 – 2 = 27.
3.u = 27, i = 3, u = 27 – 3 = 24.
4.u = 24, i = 4, u = 24 – 4 = 20.
5.u = 20, i = 5, u = 20 – 5 = 15.
6.u = 15, i = 6, u = 15 – 6 = 9.
Answer: 9

Working programm:

program ui;
Var u, i: integer;
Begin
u: = 30;
For i: = 1 to 6 do
u: = u – i;
Writeln (u);
End.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.