Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. for (int i = 0; i < listing.size(); i += 2)
  2. {
  3. string choice;
  4. if (i == (listing.size()-1))
  5. winners.push_back(listing[i]);
  6. else
  7. {
  8. cout << listing[i] << " or " << listing[i + 1] << "?\n";
  9. getline(cin, choice);
  10. }
  11. /*while ((choice != listing[i]) || (choice != listing[i + 1]))
  12. {
  13. cout << "Invalid Response (" << choice << ") try again.\n";
  14. getline(cin, choice);
  15. }*/
  16. if (choice == listing[i])
  17. winners.push_back(listing[i]);
  18. else if (choice == listing[i + 1])
  19. winners.push_back(listing[i + 1]);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement