program oken;
uses crt;
var i,n,tich,tong,hieu:longint;
thuong:real;
a: array [1..100] of integer;
begin
clrscr;
write('nhap so phan tu cua mang: '); readln(n);
tich:=1; thuong:=1; hieu:=0; tong:=0;
for i:=1 to n do
begin
write('a[',i,']: '); readln(a[i]);
tong:=tong+a[i];
hieu:=hieu-a[i];
thuong:=thuong/a[i];
tich:=tich*a[i];
end;
writeln('tong: ',tong);
writeln('hieu: ',hieu);
writeln('tich: '.tich);
writeln('thuong: ',thuong:0:3);
readln;
end.