From 8d5db2bd016d65450e5c55e3683ca3013a0cb663 Mon Sep 17 00:00:00 2001 From: Max Kuse Date: Mon, 7 Feb 2022 13:14:27 -0800 Subject: [PATCH 1/8] Added main.cpp file --- main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.cpp b/main.cpp index bb63cb8..c34c6bd 100644 --- a/main.cpp +++ b/main.cpp @@ -5,13 +5,13 @@ int main() { int age; string name; - char last initial; + char last_initial; cout<<"Hi. What is your first name? " - cin<>last initial; - cout<<"Thanks, "<> name; + cout << name ", what is the first letter of your last name? "; + cin >> last_initial; + cout << "Thanks, " << name << " " << last initial << "." <>age>>endl; @@ -19,7 +19,7 @@ int main() { cout<<"Hey kid, how do you like school?\n"; } - if( age < 18 ) + else if( age < 18 ) cout<<"Cool!"endl; cout<<"How's highschool going?\n"; else( age >= 18 ); From 0228bb2b4401bb461a4791cb455d8bacd517cbb4 Mon Sep 17 00:00:00 2001 From: mwkuse <91228185+mwkuse@users.noreply.github.com> Date: Mon, 21 Feb 2022 02:35:26 -0800 Subject: [PATCH 2/8] Create main.yml --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..aa04049 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +# This is a basic workflow to help you get started with Actions + +name: C++ CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Compile C++ 2017 + run: g++ main.cpp -std=c++17 From b549e58fbae96a0b4e5172f6af3179acb98d6e7a Mon Sep 17 00:00:00 2001 From: mwkuse <91228185+mwkuse@users.noreply.github.com> Date: Mon, 21 Feb 2022 02:37:03 -0800 Subject: [PATCH 3/8] Create README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ba5e82 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Bugtastic + +[![C++ CI](https://github.com/mwkuse/430FirstRepo/actions/workflows/main.yml/badge.svg)](https://github.com/mwkuse/430FirstRepo/actions/workflows/main.yml) From f9cd594d1449e23dc079ae57650eb52171e26424 Mon Sep 17 00:00:00 2001 From: mwkuse <91228185+mwkuse@users.noreply.github.com> Date: Mon, 21 Feb 2022 02:42:07 -0800 Subject: [PATCH 4/8] Update main.cpp --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d7a7704..11cbae4 100644 --- a/main.cpp +++ b/main.cpp @@ -20,9 +20,10 @@ int main() { cout<<"Hey kid, how do you like school?\n"; } - else if( age < 18 ) + else if( age < 18 ){ cout<<"Cool!"endl; cout<<"How's highschool going?\n"; + } else if( age == 18 ) { cout<<"Hey!"< Date: Mon, 21 Feb 2022 02:43:19 -0800 Subject: [PATCH 5/8] Update main.cpp --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 11cbae4..23c5e3b 100644 --- a/main.cpp +++ b/main.cpp @@ -21,7 +21,7 @@ int main() cout<<"Hey kid, how do you like school?\n"; } else if( age < 18 ){ - cout<<"Cool!"endl; + cout<<"Cool!"< Date: Mon, 21 Feb 2022 02:44:05 -0800 Subject: [PATCH 6/8] Update main.cpp --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 23c5e3b..c94d4dd 100644 --- a/main.cpp +++ b/main.cpp @@ -14,7 +14,7 @@ int main() cin >> last_initial; cout << "Thanks, " << name << " " << last initial << "." <>age>>endl; + cin>>age; if( age < 12 ) { From 746ed8dfdac4d86fc203de90249f39b6c51120dd Mon Sep 17 00:00:00 2001 From: mwkuse <91228185+mwkuse@users.noreply.github.com> Date: Mon, 21 Feb 2022 02:44:58 -0800 Subject: [PATCH 7/8] Update main.cpp --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index c94d4dd..9a4c2f8 100644 --- a/main.cpp +++ b/main.cpp @@ -12,7 +12,7 @@ int main() cin >> name; cout << name ", what is the first letter of your last name? "; cin >> last_initial; - cout << "Thanks, " << name << " " << last initial << "." <>age; From ab91af046e6333a2fbe23a8b7f19ac7295a0e1bc Mon Sep 17 00:00:00 2001 From: mwkuse <91228185+mwkuse@users.noreply.github.com> Date: Mon, 21 Feb 2022 02:46:05 -0800 Subject: [PATCH 8/8] Update main.cpp --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 9a4c2f8..531d6a2 100644 --- a/main.cpp +++ b/main.cpp @@ -8,9 +8,9 @@ int main() string name; char last_initial; - cout<<"Hi. What is your first name? " + cout<<"Hi. What is your first name? " << endl; cin >> name; - cout << name ", what is the first letter of your last name? "; + cout << name << ", what is the first letter of your last name? "; cin >> last_initial; cout << "Thanks, " << name << " " << last_initial << "." <