Advertisement
deced

Untitled

Jun 11th, 2021
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. procedure WriteNod(a, b: Integer);
  2. function Nod(a, b: Integer): Integer;
  3. begin
  4. while a <> b do
  5. if a > b then
  6. a := a - b
  7. else
  8. b := b - a;
  9. Result := a;
  10. end;
  11. begin
  12. Writeln('Нод равен ', Nod(a, b));
  13. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement