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 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) diff --git a/main.cpp b/main.cpp index ecca4f4..531d6a2 100644 --- a/main.cpp +++ b/main.cpp @@ -6,23 +6,24 @@ 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; + 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!"<