diff --git a/main.cpp b/main.cpp index 690cf17..1d3c289 100644 --- a/main.cpp +++ b/main.cpp @@ -24,14 +24,17 @@ int main(){ pick = rand() % VALIDATION.size(); cout << "What are you listening to?\n"; input = get_input_in_lowercase(); - cout << VALIDATION[pick] << "! Let's listen to more\n"; + if(input != "nothing") + cout << VALIDATION[pick] << "! Let's listen to more\n"; - do{ + + while( input != "nothing" ) { cout << "What's next?\n"; input = get_input_in_lowercase(); pick = rand() % VALIDATION.size(); - cout << VALIDATION[pick] << "!\n"; - }while( input != "nothing" ); + if( input != "nothing") + cout << VALIDATION[pick] << "!\n"; + }; return 0; } @@ -41,4 +44,4 @@ string get_input_in_lowercase(){ getline(cin,in); transform(in.begin(), in.end(), in.begin(), [](unsigned char c){ return std::tolower(c); }); return in; -} \ No newline at end of file +}