Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- #include <conio.h>
- using namespace std;
- struct statis
- {
- string name;
- string pol ;
- int year ;
- string gorod ;
- string diagnoz ;
- };
- int main ()
- {
- string y,g;
- int x,k=0
- statis fallen [5];
- cout «"Vvesty gorod";
- cin»g;
- cout«"Vvesty year";
- cin»x;
- cout «"Vvecny diagnoz";
- cin»y;
- ifstream file ("in.dat");
- for (int i=0;i<5;i++)
- {
- file »fallen [i].name»fallen [i].pol»fallen[i].year»fallen[i].gorod»fallen[i].diagnoz
- }
- file.close();
- for (int i=1;i<5;i++)
- {
- if(fallen[i].gorod 1=g)
- {k+=1;
- }
- if((fallen[i].year>x)&&(fallen[i].diagnoz== y))
- cout«fallen [i].name«fallen [i].pol«fallen[i].year«fallen[i].gorod«fallen[i].diagnoz«cude;
- }
- cout«"Kol inogorodnix"«n«endl;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement