Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. using namespace std;
  2.  
  3. struct clothes
  4. {
  5. char gender;
  6. char type;
  7. int price;
  8. };
  9.  
  10. int main()
  11. {
  12. ifstream file("duomenys.txt");
  13. int amount;
  14. int end;
  15. file >> amount;
  16. end = amount;
  17. clothes robe[amount];
  18.  
  19. for(int x = 0; x<amount; x++)
  20. {
  21. file >> robe[x].gender >> robe[x].type >> robe[x].price;
  22. }
  23.  
  24. for(int x = amount - 1; x>0; x--)
  25. {
  26. for(int i = 0; i < end; i++)
  27. {
  28. if(robe[i].price > robe[i+1].price)
  29. {
  30. ???
  31. }
  32. }
  33.  
  34. end--;
  35. }
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement