In the language of Pascal. In the composition of the program, which is entered from the keyboard
August 17, 2021 | education
| In the language of Pascal. In the composition of the program, which is entered from the keyboard, a sequence of five hung after entering each number, the arithmetic average of the received part of the sequence is displayed.
program aver;
var n, s: integer; // n – number, s – sum of numbers
a: real; // Average value of entered numbers
begin
s: = 0;
for i: integer: = 1 to 5 do
begin
write (‘Enter a number:’);
readln (n);
s: = s + n;
a: = s / i;
writeln (‘Average value of entered numbers:’, a)
end
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.