From 896e9ed7f5bc41b6320eb6db0badf6e56cb20ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mu=C3=B1oz?= Date: Mon, 7 Feb 2022 11:39:05 -0800 Subject: [PATCH 1/2] Fixed bugs --- main.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/main.cpp b/main.cpp index bb63cb8..fa73aef 100644 --- a/main.cpp +++ b/main.cpp @@ -5,27 +5,28 @@ int main() { int age; string name; - char last initial; + char 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, "<> lastinitial; + 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!"<= 18 ); { cout<<"Pleased to meet you!\n"; - } + return 0; } From 3e1de59d2e819cca0fbdfd810b994d46002a8ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mu=C3=B1oz?= Date: Mon, 7 Feb 2022 11:39:51 -0800 Subject: [PATCH 2/2] Fixed bugs --- main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/main.cpp b/main.cpp index fa73aef..b20179a 100644 --- a/main.cpp +++ b/main.cpp @@ -24,7 +24,6 @@ int main() cout<<"How's highschool going?\n"; } else( age >= 18 ); - { cout<<"Pleased to meet you!\n";