Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <map>
  4. #include <string>
  5. #include <cmath>
  6. using namespace std;
  7.  
  8. int main() {
  9. double a, b;
  10. cin >> a >> b;
  11.  
  12. while (a != b){
  13. if (a > b){
  14. a = a - b;}
  15. else{
  16. b = b - a;}
  17. }cout<< a;
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement