Advertisement
Deivydas9

67p. 5u.

Sep 22nd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int n, s, s1, sum= 0;
  9. ifstream a ("duom.txt");
  10. a >> n;
  11. for (int i=1; i<=n; i++)
  12. {
  13. a >> s;
  14. a >> s1;
  15. if (s1 < s)
  16. sum = sum + 1;
  17.  
  18. }
  19. cout << sum ;
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement