# Write a program that the computer will ask you to enter any numbers ten times and, as a result

**Write a program that the computer will ask you to enter any numbers ten times and, as a result, will display the arithmetic mean of the numbers entered (do not use an array). Make three versions of the program using the While, Repeat, For statements.**

First option:

Sum: = 0;

for i: = 1 to n do

begin

Write (‘a =’);

ReadLn (a);

Sum: = Sum + a;

end;

Sred: = Sum / n;

Writeln (‘Sred =’, Sred: 6: 2);

ReadLn;

end.

Second option:

Sum: = 0;

i: = 1;

repeat

Write (‘a =’);

ReadLn (a);

Sum: = Sum + a;

i: = i + 1;

until i> n;

Sred: = Sum / n;

Writeln (‘Sred =’, Sred: 6: 2);

WriteLn;

Third option:

uses Crt;

const n = 10;

var a, i, Sum: integer;

Sred: real;

begin

ClrScr;

Sum: = 0;

i: = 1;

While i <= 10 do

begin

Write (‘a =’);

ReadLn (a);

Sum: = Sum + a;

i: = i + 1;

end;

Sred: = Sum / n;

Writeln (‘Sred =’, Sred: 6: 2);

WriteLn;