Write a program that finds the average of three numbers entered. All three numbers are assumed to be different.

Let’s write a program that will find the average of three entered numbers:

program 2;

var x, y, z: integer;

begin

writeln (‘Enter three different integers x, y and z’);

readln (x, y, z);

if x> y and x <z then

writeln (‘Average =’, x);

else

if x <y and x> z then

writeln (‘Average =’, x);

else

if y <x and y> z then

writeln (‘Average =’, y);

else

if y> x and y <z then

writeln (‘Average =’, y);

else

if z <x and z> y then

writeln (‘Average =’, z);

else

if z> x and z <y then

writeln (‘Average =’, z);

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.