#include #include #include using namespace std; int main() { const string musik[][9]{ {"new wave", "e-hiphop","jazz fusion", "neoclassical","space age pop","dark synth","disco","avant garde jazz","classical"}, {"Hungry Like the Wolf by Duran Duran","Whirlwind Thru Cities by Afu-ra","Black Market by Weather Report","Rite of Spring introduction by Igor Stravinsky","Plantasia by Mort Garson","Roller Mobster by Carpenter Brut","I Will Survive by Gloria Gaynor","Message to the Earthman by Sun Ra","Eine Kleine Nachtmusik by Wolfgang Amadeus Mozart"} }; const size_t m {size(musik)}; const size_t song {size(musik[0])}; cout << "List of Genres: \n"; for (int k {0}; k < song; ++k){ cout << musik[0][k] << "\n"; } cout << "\n"; cout << "Please type a genre and I'll give a song: \n\n"; string genre; getline(cin, genre); for (int i {0}; i < song; ++i){ if (musik[0][i] == genre){ cout << "A song in " << genre << " is " << musik[1][i] << "\n"; return EXIT_SUCCESS; } } cerr << "Sorry, " << genre << " wasn't listed or try again to type it correctly.\n"; return EXIT_FAILURE; }