Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Untested!}
- program umur;
- uses crt;
- var TglLhr,BlnLhr,ThnLhr,TglSkrg,BlnSkrg,ThnSkrg,Umur:integer;
- begin
- write('Tanggal Lahir : '); readln(TglLhr);
- write('Bulan Lahir : '); readln(BlnLhr);
- write('Tahun Lahir : '); readln(ThnLhr);
- writeln;
- write('Tanggal Sekarang : '); readln(TglSkrg);
- write('Bulan Sekarang : '); readln(BlnSkrg);
- write('Tahun Sekarang : '); readln(ThnSkrg);
- writeln;
- {Proses}
- Umur:=((ThnSkrg*365)+(BlnSkrg*30)+TglSkrg)-((ThnLhr*365)+(BlnLhr*30)+TglSkrg);
- writeln('Jadi usia dalam satuan hari = ',Umur);
- writeln;
- writeln('Catatan :');
- writeln('1 tahun = 365 hari');
- writeln('1 bulan = 30 hari');
- writeln;
- write('Tekan Enter untuk keluar...'); readln; clrscr;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement