uses crt; var a,b,d,e,f:integer; c:array[1..255] of integer; begin clrscr; write('masukkan sebuah bilangan desimal! '); readln(a); write('bilangan kuaternari dari bilangan desimal ',a,' adalah '); if a<=3 then write(a) else repeat b:=b+1; d:=trunc(a/4); c[b]:=a mod 4; if d<=3 then begin b:=b+1; c[b]:=d; end; a:=d; until d<=3; for e:=b downto 1 do begin write(c[e]); end; readln end. |
silakan cek di http://www.convertworld.com/id/angka/Desimal.html
0 komentar:
Posting Komentar