From aa6cf565e9e6d6ebced73c0e7e009728b9e31115 Mon Sep 17 00:00:00 2001 From: Cameron Watts Date: Mon, 7 Feb 2022 12:30:09 -0800 Subject: [PATCH] fixed bugs in main.cpp --- main.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.cpp b/main.cpp index ecca4f4..875784f 100644 --- a/main.cpp +++ b/main.cpp @@ -6,24 +6,24 @@ 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, "<>age>>endl; + cin>>age; if( age < 12 ) { cout<<"Hey kid, how do you like school?\n"; } - if( age < 18 ) - cout<<"Cool!"endl; + if( age < 18 ) { + cout<<"Cool!"<