#include <iostream>
#include <string>
using namespace std;
int main()
{
cout<<"Enter employee name (1 word), salary and degree
->";
string name;
double salary;
int degree;
cin>>name>>salary>>degree;
switch (degree)
{
case 1: salary*=1.7; break;
case 2: salary*=1.5; break;
case 3: salary*=1.3; break;
case 4: salary*=1.15; break;
default: cout<<"Wrong degree
";
}
cout<<name<<" "<<salary<<endl;
system("pause");
return 0;
}
Comments
Leave a comment