habel's Blog

program konversi_bilangan

Posted on: 19 Februari 2010

Program Konversi_Bilangan;
Uses WinCrt;
Var
des,desi : integer;
Bin,temp : String;
Begin
Write(‘Masukkan Suatu Bilangan Desimal :’);Readln(des);
desi:=des;
bin:=”;
repeat
str(des mod 2, temp);
bin:=temp+bin;des:=des div 2;
writeln(des:4,bin:20);
until des=0;
writeln(‘(‘,desi,’) desimal =’,bin,’ (Biner)’);
end.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: