Skip to content

Instantly share code, notes, and snippets.

@yudium
Created September 24, 2015 23:36
Show Gist options
  • Save yudium/26ada37da71ee7dfde23 to your computer and use it in GitHub Desktop.
Save yudium/26ada37da71ee7dfde23 to your computer and use it in GitHub Desktop.
Tolong edit teks di baris [9], baris [17]
program Ubah_Hari_Ke_Tahun_Bulan_Hari;
{I.S. : user memasukkan jumlah hari * tolong edit}
{F.S. : menampilkan konversi jumlah hari ke tahun, bulan n hari * tolong edit}
var
jmlh _hari, tahun, bulan, hari : Integer;
begin
write('Jumlah Hari : ');
readln(jmlh_hari);
tahun := jum_hari div 365;
bulan := (jum_hari - (tahun * 365)) div 30;
hari := jum_hari - (tahun * 365 + bulan * 30);
writeln;
write('Proyek selama ', jmlh_hari, ' sama dengan ');
write(tahun, ' tahun, ');
write(bulan, ' bulan ');
write(hari, ' hari');
readln;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment