Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include <string>
- #include <stdio.h>
- #include <string>
- #include <cstdlib>
- using namespace std;
- int c, l, z, x, d, i, k, m, b, n,p;
- string a, f, v;
- string e[999];
- int main()
- {
- n=3;// количество фотболистов
- for (i = 1; i <= n; i++) {
- getline(cin, a);
- a = a + ' ';
- p = a.find_first_of(" ");
- f = a;
- e[i] = f.erase(p);
- a.erase(0, p + 1);
- e[i] += ' ';
- p = a.find_first_of(" ");
- f = a;
- e[i] += f.erase(p);
- a.erase(0, p + 1);
- p = a.find_first_of(" ");
- f = a;
- v = f.erase(p);
- z = atoi(v.c_str());
- a.erase(0, p + 1);
- p = a.find_first_of(" ");
- f = a;
- v = f.erase(p);
- x = atoi(v.c_str());
- a.erase(0, p + 1);
- if ((z <= 1998) && (z >= 1990) && (x == 0)) {
- l++;
- }
- else { e[i] = '\0'; }
- }
- cout << l;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement