Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <fstream>
- #include <string>
- using namespace std;
- struct point {
- string mark, fam, num;
- int year, prob;
- };
- ifstream in("input.txt");
- ofstream out("output.txt");
- int main()
- {
- int y, n;
- in >> y >> n;
- point t, a[51];
- for (int i = 0; i < n; i++) {
- in >> a[i].mark >> a[i].num >> a[i].fam >> a[i].year >> a[i].prob;
- }
- for (int i = 0; i < n; i++) {
- if (a[i].year <= y) {
- out << a[i].mark << " " << a[i].num << " " << a[i].fam << " "<< a[i].year << " "<< a[i].prob;
- out << endl;
- }
- }
- return 0;
- }
- 2020 6
- Honda 1ddd98 ivanov 2012 20000
- Mazda 2xyz55 rustik 2013 15111
- Wolksvagen 5jkl87 ararat 2021 51515
- chevrolet 6ytr14 kiseleva 2023 15124
- honda 9hfg25 holod 2024 32232
- cherry h657df beregnoi 2019 5165165
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement