konversi desimal to biner

June 24, 2008 at 6:55 am | Posted in Informatic | 3 Comments

lo yang ini konversi desimal to biner using pascal :

Program Konversi_desimal_biner;

Uses WinCrt;

Var

des,desi : longint;

biner : String;

Begin

Write(‘Masukkan Suatu Bilangan Desimal : ‘);Readln(des);

desi := des;

biner:= ”;

repeat

if(des mod 2 = 0) then

biner:=’0′ + biner

else

biner:=’1′ + biner;

des:=des div 2;

until des=0;

writeln(desi,’ (desimal) = ‘,biner,’ (biner)’);

end.

3 Comments »

RSS feed for comments on this post. TrackBack URI

  1. om bagi coding konversi desi ke roma yang pake java dong..
    Thanks before ya om..

  2. thx y..

  3. weh ada yg manggil om hihihihihi


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: