Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main () {
  6.  
  7. int a,b;
  8.  
  9.  
  10.  
  11. const int gcd(const int a_, const int b_)
  12.  
  13. cout<<"ievadiet 2 pozitivus skaitlus"<<endl;
  14. cin>>a>>b;
  15.  
  16. }
  17.  
  18.  
  19. int a= a_;
  20. int b= b_;
  21. int h;
  22.  
  23. while (b!=0)
  24. {
  25. h=a%b;
  26. a=b;
  27. b=h;
  28. }
  29.  
  30. return a;
  31. }
  32. }
  33.  
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement