From fe81071d9d0a76b701cc6fb324f308c9d175e32d Mon Sep 17 00:00:00 2001 From: R Mar Date: Mon, 7 Feb 2022 11:40:27 -0800 Subject: [PATCH] Fixed bugs so it compiles --- main.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index bb63cb8..b2edfa9 100644 --- a/main.cpp +++ b/main.cpp @@ -5,23 +5,25 @@ int main() { int age; string name; - char last initial; + char last_initial; - 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, "<>last_initial; + cout<<"Thanks, " << name << " " << last_initial<< "." << endl; cout<<"Please also tell me how old you are: "; - cin>>age>>endl; + cin>>age; if( age < 12 ) { cout<<"Hey kid, how do you like school?\n"; } if( age < 18 ) - cout<<"Cool!"endl; + { + cout<<"Cool!"<= 18 ); { cout<<"Pleased to meet you!\n";