diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dfdbb7c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Compile + run: g++ main.cpp -std=c++17 -o Bugtastic 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) 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; }