Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. struct Vznosu
  4. {
  5. char name[20];
  6. double money;
  7. };
  8. int main()
  9. {
  10. cout<<"vvedite kolichestvo vznosov ";
  11. int kolvo,i,y,z,h;
  12. z=0;
  13. h=0;
  14. cin>>kolvo;
  15. Vznosu *vznosu = new Vznosu[kolvo];
  16. for (i=0; i<kolvo; i++)
  17. {
  18. cin.get();
  19. cout<<"\nVvedite imya ";
  20. cin.get(vznosu[i].name, 20);
  21. cout<<"\nVvedite summu ";
  22. cin>>vznosu[i].money;
  23. }
  24. cout<<"eti lyudi yavlayutsa pochetnumi chlenami obshestva:\n";
  25. for (y=0; y<kolvo; y++)
  26. {
  27. if (vznosu[y].money>10000)
  28. {
  29. z++;
  30. cout<<vznosu[y].name<<"\n";
  31. }
  32. }
  33. if (z==0)
  34. cout<<"\nNET\n";
  35. cout<<"sponsoru:\n";
  36. for (y=0; y<kolvo; y++)
  37. if (vznosu[y].money<10000)
  38. {
  39. h++;
  40. cout<<vznosu[y].name<<"\n";
  41. }
  42. if (h==0)
  43. cout<<"\nvznosov net";
  44.  
  45. cin>>y;
  46. return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement