Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Vytvorte program ktory nacita dve prirodzene cisla a najde spolocny nasobok
- program najvacsispolocnydelitel;
- {$APPTYPE CONSOLE}
- uses SysUtils;
- var c1,c2:byte;
- begin
- { TODO -oUser -cConsole Main : Insert code here }
- write('Zadajte 1 cislo: ');
- readln(c1);
- write('Zadajte 2 cislo: ');
- readln(c2);
- while (c1<>c2) do
- if c1 > c2 then c1:=c1-c2
- else c2:=c2-c1;
- writeln('Spolocny delitel je: ',c1);
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment