Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program NWD;
- uses crt;
- var
- a,b,c,d : Int64;
- begin
- clrscr;
- write('Podaj pierwsza liczbe: ');
- readln(a);
- write('Podaj druga liczbe: ');
- readln(b);
- c:=a;
- d:=b;
- WHile c<>d DO Begin
- IF c>d THEN begin
- c:=c-d;
- end
- ELSE d:=d-c;
- end;
- Writeln('NWD to: ',c);
- readln;
- END.
Advertisement
Add Comment
Please, Sign In to add comment