Skip to content

Commit

Permalink
resolving single itemed list, closes ChicoState#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoria committed Sep 25, 2024
1 parent fc7e124 commit 3d6e51a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ int main(){
else{
cout << "What is your next favorite?\n";
}
cin >> input;
getline(cin, input);
list.push_back(input);
}while( input != "done" );

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

Expand Down

0 comments on commit 3d6e51a

Please sign in to comment.