Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include <string>
  4. #include <stdio.h>
  5. #include <string>
  6. #include <cstdlib>
  7. using namespace std;
  8. int c, l, z, x, d, i, k, m, b, n,p;
  9. string a, f, v;
  10. string e[999];
  11. int main()
  12. {
  13.  
  14.  
  15. n=3;// количество фотболистов
  16.  
  17.  
  18. for (i = 1; i <= n; i++) {
  19. getline(cin, a);
  20. a = a + ' ';
  21. p = a.find_first_of(" ");
  22. f = a;
  23. e[i] = f.erase(p);
  24. a.erase(0, p + 1);
  25. e[i] += ' ';
  26. p = a.find_first_of(" ");
  27. f = a;
  28. e[i] += f.erase(p);
  29. a.erase(0, p + 1);
  30. p = a.find_first_of(" ");
  31. f = a;
  32. v = f.erase(p);
  33. z = atoi(v.c_str());
  34. a.erase(0, p + 1);
  35. p = a.find_first_of(" ");
  36. f = a;
  37. v = f.erase(p);
  38. x = atoi(v.c_str());
  39. a.erase(0, p + 1);
  40. if ((z <= 1998) && (z >= 1990) && (x == 0)) {
  41. l++;
  42. }
  43. else { e[i] = '\0'; }
  44.  
  45.  
  46. }
  47. cout << l;
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement