Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: compile

on:
pull_request:
branches: [ "main" ]
push:
branches: [ "devops" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Compile
run: g++ -std=c++17 main.cpp
Binary file added a.out
Binary file not shown.
10 changes: 9 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@ int main(){
srand(time(0));
pick = rand() % VALIDATION.size();
cout << "What are you listening to?\n";
<<<<<<< HEAD
input = get_input_in_lowercase();
=======
getline(cin,input);
transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); });
if (input == "nothing" || input.empty()) return 0;
>>>>>>> e174f19 (Fixed the nothing on first input)
cout << VALIDATION[pick] << "! Let's listen to more\n";

do{
cout << "What's next?\n";
input = get_input_in_lowercase();
pick = rand() % VALIDATION.size();
cout << VALIDATION[pick] << "!\n";
}while( input != "nothing" );
}while( input != "nothing" && !input.empty() );



return 0;
}
Expand Down