Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <fstream>
  2. #include <iostream>
  3. #include <conio.h>
  4. using namespace std;
  5. struct statis
  6. {
  7. string name;
  8. string pol ;
  9. int year ;
  10. string gorod ;
  11. string diagnoz ;
  12. };
  13. int main ()
  14. {
  15. string y,g;
  16. int x,k=0
  17. statis fallen [5];
  18. cout «"Vvesty gorod";
  19. cin»g;
  20. cout«"Vvesty year";
  21. cin»x;
  22. cout «"Vvecny diagnoz";
  23. cin»y;
  24. ifstream file ("in.dat");
  25. for (int i=0;i<5;i++)
  26. {
  27. file »fallen [i].name»fallen [i].pol»fallen[i].year»fallen[i].gorod»fallen[i].diagnoz
  28. }
  29. file.close();
  30. for (int i=1;i<5;i++)
  31. {
  32. if(fallen[i].gorod 1=g)
  33. {k+=1;
  34. }
  35. if((fallen[i].year>x)&&(fallen[i].diagnoz== y))
  36. cout«fallen [i].name«fallen [i].pol«fallen[i].year«fallen[i].gorod«fallen[i].diagnoz«cude;
  37. }
  38. cout«"Kol inogorodnix"«n«endl;
  39. getch();
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement