Saturday, 14 February 2015

Membuat Desimal ke Biner Mengunakan Pascal

Cara Cepat Belajar Pacal : Membuat Desimal ke Biner


    Bagi yang bingung cara mengkoversi kan Bilangan Desimal Ke Biner,ini ane buat program nya melalui Turbo Pascal 1.5.



Ambil Coding dan lihat gambar nya dibawah yah semua :



program des2bin_brema;
uses wincrt;
var
dec,des:integer;
bin: string;
begin
clrscr;
writeln('Konversi Bilangan Desimal Ke Biner');
writeln('==================================');
writeln;
Write('Masukkan bilangan : ');Readln(dec);
des:=dec;
bin:='';
repeat
if(dec mod 2 = 0)
then bin:='0'+bin
else bin:='1' + bin;
dec:=dec div 2;
until dec=0;
if length(bin) <> 16 then
begin
repeat
bin := '0' + bin;
until length(bin) = 16;
end;
writeln(des,' = ',bin,' (Biner)');
end.





Hasil Program :




Posted By: brema bastanta

Membuat Desimal ke Biner Mengunakan Pascal

Share:

Post a Comment

Facebook
Blogger

Follow Us

About Us

Advertisment

Like Us

© OFFICIAL BLOG SEDERHANA BREMA | BREMA NOTE BLOG All rights reserved | Theme Designed by Seo Blogger Templates Published.. Blogger Templates