Program Menghitung_Umur_Seseorang;
Uses Wincrt;
label awal, akhir;
Var dd,mm,yy,x1,x2,x3,Total_Jam:longint;
ulang:char;
Begin
awal:
clrscr;
Writeln ('Masukkan Umur Anda Dalam:');
Writeln ('=========================');
Write ('Tahun = ');read (yy);
Write ('Bulan = ');read (mm);
Write ('Hari = ');read (dd);
x1:=yy * 365 * 24;
x2:=mm * 30 * 24;
x3:=dd * 24;
Total_Jam:=x1+x2+x3;
Writeln ('==================================');
Writeln ('Anda sekarang hidup adalah ',(Total_Jam), ' Jam');
Writeln ('==================================');
Writeln('Created, Ardiansyah. B || 20142205002 || TI.11');
Writeln ('==================================');
Writeln ('Mau menghitung ulang? [Y/T]: ');
ulang := readkey;
if upcase(ulang)='Y' then goto awal
else goto akhir;akhir:
end.
=================================================
Berikut hasil jadinya :
Kalau cara ngitung, tahun, bulan, pekan, haru, jam, menit dan detik gmna bang,.??
BalasHapusmohon bantuannya