Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
52 changes: 23 additions & 29 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
#include <iostream>

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<<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>>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!"<<endl;
}
else
{
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;
}