Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int a, b, N;
  6. cin >> N;
  7. for (b = 1; b <= N; b++)
  8. {
  9. if (b!=1)
  10. cout << "1/" << b << endl;
  11. for (a = 1; a < N; a++)
  12. if (b>a)
  13. {
  14. if ((b%a) != 0)
  15. cout << a << "/" << b << endl;
  16. }
  17. }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement