Skip to content

Commit

Permalink
Updating output to not show 'done' resolves issue ChicoState#1
Browse files Browse the repository at this point in the history
  • Loading branch information
clmcguire committed Sep 25, 2024
1 parent c4140ea commit 9e5e460
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,22 @@ using std::cout, std::cin, std::endl, std::string, std::vector;

int main(){
string input = "";
vector<string> list;
vector<string> favorites;

do{
if( list.size() == 0 ){
if( favorites.size() == 0 ){
cout << "What is your favorite?\n";
}
else{
cout << "What is your next favorite?\n";
}
cin >> input;
<<<<<<< main
======
favorites.push_back(input);
>>>>>>> main
}while( input != "done" );
list.push_back(input);
favorites.push_back(input);

cout << "Your favorite list:\n";
for(int i = 0; i < list.size(); i++){
cout << list.at(i) << endl;
for(int i = 0; i < favorites.size(); i++){
cout << favorites.at(i) << endl;
}

return 0;
Expand Down

0 comments on commit 9e5e460

Please sign in to comment.