Advertisement
LuongIT

ex4_finaltest

Jan 14th, 2016
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. struct PhanSo
  5. {
  6.     int tuso[100];
  7.     int mauso[100];
  8. };
  9.  
  10. int main()
  11. {
  12.     struct PhanSo ps;
  13.     int i, n;
  14.  
  15.     scanf("%d", &n);
  16.  
  17.     for (i = 0; i < n; i++)
  18.         scanf("%d %d", &ps.tuso[i], &ps.mauso[i]);
  19.  
  20.     for (i = 0; i < n; i++)
  21.         if (ps.tuso[i] % ps.mauso[i] == 0)
  22.             printf("%d/%-2d", ps.tuso[i], ps.mauso[i]);
  23.  
  24.     getch();
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement