From 3cddace709b37f35d0e03e128f0a912ee3bd784f Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Thu, 18 Jul 2024 14:11:18 +0300 Subject: [PATCH] Fix Lesson 1 Task 3 --- Lesson_1/Task_3/main.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Lesson_1/Task_3/main.cpp b/Lesson_1/Task_3/main.cpp index a128d70..2e60947 100644 --- a/Lesson_1/Task_3/main.cpp +++ b/Lesson_1/Task_3/main.cpp @@ -10,23 +10,11 @@ int main() if (money < 1000) cout << "Work more. "; - - if (money > 999) - if (money < 1001) { - cout << "Illegal salary." << endl; - return 1; - } - - if (money > 1000) { - if (money > 1000000) + if (money > 999) { + if (money > 999999) cout << "You are a millionaire. "; if (money < 1000000) cout << "You work great. "; - if (money > 999999) - if (money < 1000001) { - cout << "Illegal salary." << endl; - return 1; - } } cout << "You are doing great!" << endl;