-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbeecrowd1048.cpp
More file actions
71 lines (66 loc) · 2.18 KB
/
beecrowd1048.cpp
File metadata and controls
71 lines (66 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* @file beecrowd1048.cpp
* Salary increase - https://prnt.sc/KCfxYOPpC1U6
* @author Md. Alamin (alamin5g@yahoo.com)
* I would love be a software engineer at Google. That is why anybody can uses this code without any condition, if you face any difficulty, then try to email me.
* @version 0.1
* @date 2022-04-22
*
* @copyright Copyright (c) 2022
*
*/
#include <bits/stdc++.h>
#include <string.h>
using namespace std;
int main()
{
double s, newS, moneyEarn;
int per;
cin >> s;
if (s > 0 && s <= 400)
{
moneyEarn = 400 * 0.15;
newS = 400 + moneyEarn;
per = 15;
cout << "Novo salario: " << fixed << setprecision(2) << newS << endl;
cout << "Reajuste ganho: " << fixed << setprecision(2) << moneyEarn << endl;
cout << "Em percentual: " << per << " %" << endl;
}
else if (s > 400 && s <= 800)
{
moneyEarn = s * 0.12;
newS = s + moneyEarn;
per = 12;
cout << "Novo salario: " << fixed << setprecision(2) << newS << endl;
cout << "Reajuste ganho: " << fixed << setprecision(2) << moneyEarn << endl;
cout << "Em percentual: " << per << " %" << endl;
}
else if (s > 800 && s <= 1200)
{
moneyEarn = s * 0.10;
newS = s + moneyEarn;
per = 10;
cout << "Novo salario: " << fixed << setprecision(2) << newS << endl;
cout << "Reajuste ganho: " << fixed << setprecision(2) << moneyEarn << endl;
cout << "Em percentual: " << per << " %" << endl;
}
else if (s > 1200 && s <= 2000)
{
moneyEarn = s * 0.07;
newS = s + moneyEarn;
per = 7;
cout << "Novo salario: " << fixed << setprecision(2) << newS << endl;
cout << "Reajuste ganho: " << fixed << setprecision(2) << moneyEarn << endl;
cout << "Em percentual: " << per << " %" << endl;
}
else if (s > 2000)
{
moneyEarn = s * 0.04;
newS = s + moneyEarn;
per = 4;
cout << "Novo salario: " << fixed << setprecision(2) << newS << endl;
cout << "Reajuste ganho: " << fixed << setprecision(2) << moneyEarn << endl;
cout << "Em percentual: " << per << " %" << endl;
}
return 0;
}