Advertisement
CyberPascal

Untitled

May 2nd, 2014
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.23 KB | None | 0 0
  1. var a,b,m,n,i:integer;
  2.    
  3. Begin
  4. Write(' Введите 2 числа: '); Readln(A,B);
  5.  
  6. if (A < B) then M:=A else M:=B;
  7.  
  8. for i:=1 to m do if (A mod i = 0) and (B mod i = 0) then N:=i;
  9.  
  10. Writeln(' НОД= ',N);
  11. Readln;
  12. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement