Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace std;
- struct clothes
- {
- char gender;
- char type;
- int price;
- };
- int main()
- {
- ifstream file("duomenys.txt");
- int amount;
- int end;
- file >> amount;
- end = amount;
- clothes robe[amount];
- for(int x = 0; x<amount; x++)
- {
- file >> robe[x].gender >> robe[x].type >> robe[x].price;
- }
- for(int x = amount - 1; x>0; x--)
- {
- for(int i = 0; i < end; i++)
- {
- if(robe[i].price > robe[i+1].price)
- {
- ???
- }
- }
- end--;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement