Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program ZamianaLiczb;
- uses crt;
- var RESZTA:array[1..20] of integer;
- krok,liczba,i:integer;
- begin
- clrscr;
- gotoxy(5,4);
- write('zamiana liczb dziesietnych na układ binarny');
- gotoxy(10,7);
- write('Podaj licze: ');
- read(liczba);
- krok:=0;
- repeat
- krok:=krok+1;
- RESZTa[krok]:=liczba mod 2;
- liczba:=liczba div 2;
- until liczba=0;
- gotoxy(10,10);
- write('Liczbba ma postac binarna: ');
- for i:=krok downto 1 do write(RESZTA[i]);
- repeat until keypressed;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement