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