This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2024_Stanislav_Mykhailenko/Lesson_1/Task_3/main.cpp

36 lines
712 B
C++
Raw Normal View History

2024-06-04 08:40:07 +00:00
#include <iostream>
2024-06-11 07:48:26 +00:00
using namespace std;
2024-06-04 08:40:07 +00:00
int main()
{
int money = 0;
2024-06-11 07:48:26 +00:00
cout << "How much money do you earn? ";
cin >> money;
2024-06-04 08:40:07 +00:00
if (money < 1000)
2024-06-11 07:48:26 +00:00
cout << "Work more. ";
2024-06-12 08:30:25 +00:00
if (money > 999)
if (money < 1001) {
cout << "Illegal salary." << endl;
return 1;
}
2024-06-04 08:40:07 +00:00
if (money > 1000) {
if (money > 1000000)
2024-06-11 07:48:26 +00:00
cout << "You are a millionaire. ";
2024-06-04 08:40:07 +00:00
if (money < 1000000)
2024-06-11 07:48:26 +00:00
cout << "You work great. ";
2024-06-12 08:30:25 +00:00
if (money > 999999)
if (money < 1000001) {
cout << "Illegal salary." << endl;
return 1;
}
2024-06-04 08:40:07 +00:00
}
2024-06-11 07:48:26 +00:00
cout << "You are doing great!" << endl;
2024-06-04 08:40:07 +00:00
return 0;
}