From 4f234e64a7c8ae35f3a41d7924ada1e4f41d6db3 Mon Sep 17 00:00:00 2001 From: Braden Date: Mon, 7 Feb 2022 11:38:06 -0800 Subject: [PATCH 1/5] Fixed silly errors --- main.cpp | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/main.cpp b/main.cpp index bb63cb8..65300b7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,31 +1,30 @@ #include + using namespace std; -int main() -{ - int age; - string name; - char last initial; +int main() { + int age; + string name; + char lastInitial; + + cout << "Hi. What is your first name? " << endl; + cin >> name; + + cout << name << ", what is the first letter of your last name? "; + cin >> lastInitial; - cout<<"Hi. What is your first name? " - cin<>last initial; - cout<<"Thanks, "<>age>>endl; + cout << "Thanks, " << name << " " << lastInitial << "." << 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; - cout<<"How's highschool going?\n"; - else( age >= 18 ); - { - cout<<"Pleased to meet you!\n"; - } + if (age < 12) { + cout << "Hey kid, how do you like school?\n"; + }else if(age < 18) { + cout << "Cool!" << endl; + cout << "How's highschool going?\n"; + } else if (age >= 18) { + cout << "Pleased to meet you!\n"; + } - return 0; + return 0; } From f0252a0fc0752d57c4859a822f3873da7ab81032 Mon Sep 17 00:00:00 2001 From: Braden Date: Mon, 7 Feb 2022 12:22:46 -0800 Subject: [PATCH 2/5] Fixed formatting and errors --- main.cpp | 52 +++++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/main.cpp b/main.cpp index ecca4f4..65300b7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,36 +1,30 @@ #include + using namespace std; -// This program is a simple intro to C++ example of debugging -int main() -{ - int age; - string name; - char last initial; +int main() { + int age; + string name; + char lastInitial; + + cout << "Hi. What is your first name? " << endl; + cin >> name; + + cout << name << ", what is the first letter of your last name? "; + cin >> lastInitial; - cout<<"Hi. What is your first name? " - cin<>last initial; - cout<<"Thanks, "<>age>>endl; + cout << "Thanks, " << name << " " << lastInitial << "." << 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; - cout<<"How's highschool going?\n"; - else if( age == 18 ) - { - cout<<"Hey!"<= 18) { + cout << "Pleased to meet you!\n"; + } - return 0; + return 0; } From a9e71e397c1b88b3e9e3466b543119057840e11a Mon Sep 17 00:00:00 2001 From: Braden <38839770+bradenn@users.noreply.github.com> Date: Wed, 16 Feb 2022 11:30:52 -0800 Subject: [PATCH 3/5] ci --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 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..cd210e9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Deps + run: sudo apt install -y build-essentials + - name: Compile + run: g++ main.cpp -std=c++17 -o Bugtastic From 6b5f8eb7a81e047490d8e57ed076c53b5c8cc915 Mon Sep 17 00:00:00 2001 From: Braden <38839770+bradenn@users.noreply.github.com> Date: Wed, 16 Feb 2022 11:33:28 -0800 Subject: [PATCH 4/5] Update main.yml --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd210e9..dfdbb7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,5 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Deps - run: sudo apt install -y build-essentials - name: Compile run: g++ main.cpp -std=c++17 -o Bugtastic From 738e50a5f58a3bc63bb95df1f16f60b6273929ae Mon Sep 17 00:00:00 2001 From: Braden <38839770+bradenn@users.noreply.github.com> Date: Wed, 16 Feb 2022 11:35:00 -0800 Subject: [PATCH 5/5] 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..67e7fda --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Bugtastic + +[![C/C++ CI](https://github.com/bradenn/Bugtastic/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/bradenn/Bugtastic/actions/workflows/main.yml)