Advertisement
Spocoman

Annual Salary

Sep 23rd, 2023
987
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int experience;
  8.     cin >> experience;
  9.     cin.ignore();
  10.  
  11.     string specialty;
  12.     getline(cin, specialty);
  13.  
  14.     double salary = 0;
  15.  
  16.     if (specialty == "C# Developer") {
  17.         salary = 5400;
  18.     }
  19.     else if (specialty == "Java Developer") {
  20.         salary = 5700;
  21.     }
  22.     else if (specialty == "Front-End Web Developer") {
  23.         salary = 4100;
  24.     }
  25.     else if (specialty == "UX / UI Designer") {
  26.         salary = 3100;
  27.     }
  28.     else if (specialty == "Game Designer") {
  29.         salary = 3600;
  30.     }
  31.  
  32.     if (experience <= 5) {
  33.         salary -= salary * 0.658;
  34.     }
  35.  
  36.     printf("Total earned money: %.2f BGN", salary * 12);
  37.  
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement