Advertisement
EWTD

nok nod

Sep 17th, 2017
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.18 KB | None | 0 0
  1. program lol;
  2. var
  3. a,b,c,f,d:integer;
  4. begin
  5. readln(a,b);
  6. f:=a;
  7. d:=b;
  8. while a<>b do
  9. begin
  10. if a>b then
  11. a-=b
  12. else
  13. b-=a;
  14. c:=a
  15. end;
  16. writeln(c);
  17. writeln('NOK ', f*d/c)
  18. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement