# Write a program in which four numbers are given and you need to calculate the arithmetic

September 30, 2021 | education

| **Write a program in which four numbers are given and you need to calculate the arithmetic mean of the modules of these numbers.**

The program is written in the Delphi language. Calculates the arithmetic mean of the absolute values of 4 numbers.

var

Form1: TForm1;

r, a, v, b: integer;

bb: real;

implementation

{$ R * .dfm}

procedure TForm1.Button1Click (Sender: TObject);

begin

r: = StrToInt (Edit1.Text); // Enter a number

a: = StrToInt (Edit2.Text); // Enter a number

v: = StrToInt (Edit3.Text); // Enter a number

b: = StrToInt (Edit4.Text); // Enter a number

bb: = (Abc (r) + Abc (a) + Abc (v) + Abc (b)) / 4; // result

Label1.Caption: = floatToStr (bb); // Outputting the result

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.