Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<Division> CreateCorporateFile()
- {
- std::vector<Division> divArray;
- Division div;
- int x = 0;
- for(int x = 0; x < 4; x++)
- do {
- int quarter = 1;
- cout << "Enter the name of the division: ";
- cin >> div.divName;
- for(int i = 0; i < 4; i++)
- {
- cout << "Enter in the sales for quarter "<< quarter <<": ";
- cin >> div.sales[i];
- if(div.sales[i] > 0)
- {
- quarter++;
- }
- else
- {
- cout << "Sales are not allowed to be negative.\n";
- }
- }
- divArray.push_back(div);
- x++;
- } while(x < 4);
- return divArray;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement