#include #include using namespace std; int main(){ const double tax[7] = {0.1, 0.15, 0.25, 0.28, 0.33, 0.35, 0.396}; const int tabela[4][6] = { {9075, 36900, 89350, 186350, 405100, 406750}, {18150, 73800, 148850, 226850, 405100, 457600}, {12950, 49400, 127550, 206600, 405100, 432200}, {9075, 36900, 74725, 113425, 202550, 228800} }; int oseba; int prihodek; double davek = tax[6]; string s; getline(cin, s); switch(s[0]){ case 'S':{if(s[1] == 'i') oseba=0; else oseba = 2; break;} case 'M':{if(s[8] == 'j') oseba = 1; else oseba = 3; break;} default:oseba = 1;//surviving spouse } cin>>prihodek; for(int i=0; i<6; i++){ if(tabela[oseba][i] > prihodek){ davek = tax[i]; break; } } cout<<(int)(prihodek*davek); return 0; }