ajreuri23

שאלה 10

Oct 24th, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. int i, mone, mehane;
  2. mone = int.Parse(Console.ReadLine());
  3. mehane = int.Parse(Console.ReadLine());
  4. for (i = 1; i < 1000; i++)
  5. {
  6. if (mone % i == 0 && mehane % i == 0)
  7. {
  8. Console.WriteLine(i);
  9. Console.WriteLine((mone / i) + "/" + (mehane / i));
Add Comment
Please, Sign In to add comment