- PASCAL
program latihan2; uses wincrt; var larik : array[1..7] of integer; y,z : integer; begin z:=0; writeln; write('penjualan dalam 1 minggu '); writeln; for y:=1 to 7 do begin write('hari ke-',y,' = ');readln(larik[y]); z:=z+larik[y]; end; writeln('jumlah = ',z); end.
0 komentar:
Posting Komentar