Make a program that introduces an array from the keyboard of 6 file sizes in bytes from 10 to 2000

Make a program that introduces an array from the keyboard of 6 file sizes in bytes from 10 to 2000 and calculates: 1. total file size in kilobytes 2. average file size.

var a: array [1..6] of integer;

i: integer;

sum, razm: real;

begin

writeln (‘Enter file sizes from the keyboard’);

for i: = 1 to 6 do begin

readln (razm);

if (razm> 10) and (razm <2000) then a [i]: = razm else writeln (‘Wrong size!’);

end;

writeln (‘We calculate the total size in kilobytes’);

for i: = 1 to 10 do razm: = razm + a [i];

razm: = sum / 1024;

writeln (‘Calculate the average size of files’);

for i: = 1 to 10 do sum: = sum + a [i];

sum: = sum / 10;

writeln (‘Total size is equal to’, razm);

writeln (‘Average size is’, sum);

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.