Tag: desima

Tag: desima

Pascal : Coding Konversi Biner to Desimal
Image December 21, 2019 Ari Usman,Artikel Komputer,Pascal admin

Program konversi_Biner_to_Dec;uses crt;var bilBiner : String; function pangkat(a, b : integer): integer;var i, hasil : integer;beginhasil := 1;for i:=1 to b dobeginhasil := hasil * a;end;pangkat := hasil;end; function bin2Dec(biner : string) : integer;var n, sum, i : integer;beginn := length(biner);sum := 0;for i := n-1 downto 0 dobeginif (biner [n-1] = ‘0’) then sum

Details