Advertisement
Guest User

ASasda

a guest
Oct 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1.     cout << "Kerem irja be a torteket: \n";
  2.     tort a, b;
  3.     cout << "A tort erteke: ";
  4.     scanf_s("%d/%d", &b.x, &b.y);
  5.     while (true)
  6.     {
  7.         cout << "A tort erteke: ";
  8.         scanf_s("%d/%d", &a.x, &a.y);
  9.         if (a.y == 0)
  10.             break;
  11.         b.x *= a.y;
  12.         b.y *= a.x;
  13.     }
  14.     cout << b.x << "/" << b.y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement