program array_1_dimensi;
uses crt ;
var
A:array[1..3] of integer;
i,total : integer;
kali : Real;
begin
clrscr;
for i:=1 to 3 do
begin
write('masukan A ke-',i,':');readln(A[i]);
end;
kali := 1;
for i:=1 to 3 do
begin
total:=total+A[i];
kali:=kali*A[i];
end;
writeln('Total = ',total);
writeln('Kali = ',kali:0:0);
end.
Tidak ada komentar:
Posting Komentar