From 7bbc43e49af5b3bfc58e4ef1875acfe4e363a393 Mon Sep 17 00:00:00 2001 From: Braulio Viveros Date: Mon, 7 Feb 2022 11:40:42 -0800 Subject: [PATCH 1/4] syntax changes made to main --- main.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index bb63cb8..6024b13 100644 --- a/main.cpp +++ b/main.cpp @@ -5,26 +5,27 @@ int main() { int age; string name; - char last initial; + char last_initial; - cout<<"Hi. What is your first name? " - cin<>last initial; - cout<<"Thanks, "<>age>>endl; + cout << "Hi. What is your first name? "; + cin >> name; + cout << "name, what is the first letter of your last name? "; + cin >> last_initial; + cout << "Thanks, " << name << last_initial << "." << endl; + cout << "Please also tell me how old you are: "; + cin >> age; if( age < 12 ) { cout<<"Hey kid, how do you like school?\n"; } - if( age < 18 ) - cout<<"Cool!"endl; + else if( age < 18 ){ + cout<< "Cool!" << endl; cout<<"How's highschool going?\n"; + } else( age >= 18 ); { - cout<<"Pleased to meet you!\n"; + cout << "Pleased to meet you!\n"; } return 0; From 18c5fa6176be9ae74a9112e2f8bfd26bc6502370 Mon Sep 17 00:00:00 2001 From: bviveros <90336927+bviveros@users.noreply.github.com> Date: Wed, 16 Feb 2022 21:32:15 -0800 Subject: [PATCH 2/4] Create main.yml --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 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..6890af6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: C++ CI + +on: + push: + branches: [ master ] + pull-request: + branches: [ master ] + + jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt install -y build-essentials + - name: Compile C++ 2017 + run: g++ main.cpp -std=c++17 -o Bugtastic + From 568a1d0855ee7df4fadd12a8878df9a3864bcc85 Mon Sep 17 00:00:00 2001 From: bviveros <90336927+bviveros@users.noreply.github.com> Date: Wed, 16 Feb 2022 21:35:33 -0800 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6890af6..be1eb94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,16 +3,13 @@ name: C++ CI on: push: branches: [ master ] - pull-request: + pull_request: branches: [ master ] - - jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt install -y build-essentials - - name: Compile C++ 2017 - run: g++ main.cpp -std=c++17 -o Bugtastic - + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Compile C++ 2017 + run: g++ main.cpp -std=c++17 -o Bugtastic From e74025922467738fc58333b7e8ef4015afce956e Mon Sep 17 00:00:00 2001 From: Braulio Viveros Date: Wed, 16 Feb 2022 21:54:50 -0800 Subject: [PATCH 4/4] created README file --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..987523e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![C++ CI](https://github.com/bviveros/Bugtastic/actions/workflows/main.yml/badge.svg)](https://github.com/bviveros/Bugtastic/actions/workflows/main.yml) \ No newline at end of file