Skip to content
Open
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
14 changes: 5 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <iostream>
using namespace std;

// This program is a simple intro to C++ example of debugging
int main()
{
int age;
Expand All @@ -10,24 +9,21 @@ int main()

cout<<"Hi. What is your first name? "
cin<<name;
cout<<"name, what is the first letter of your last 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;
cin>>age;
cout<<endl;

if( age < 12 )
{
cout<<"Hey kid, how do you like school?\n";
}
if( age < 18 )
cout<<"Cool!"endl;
else if( age < 18 )
cout<<"Cool!\n";
cout<<"How's highschool going?\n";
else if( age == 18 )
{
cout<<"Hey!"<<endl;
}
else
{
cout<<"Pleased to meet you!\n";
}
Expand Down