Hello, good evening. I am in the first period of computer science, my university has a website of its own that evaluates your code and gives you a score from 0 to 100, but it happens that in this code I get 93.3, and the website says that the program does not solves everything that is needed. I'm just using everything I've been teaching, I want to know where it's wrong, or what's missing. Many thanks!
Thisismycode;
#include<iostream>usingnamespacestd;intmain(){intcodigo;floatsalarioatual,aumento,novosalario;cin>>codigo>>salarioatual;switch(codigo){case(1):aumento=salarioatual*0.5;novosalario=salarioatual+aumento;cout<<"Escrituario"<<endl<<aumento<<endl<<novosalario;
break;
case (2):
aumento=salarioatual*0.35;
novosalario=salarioatual+aumento;
cout<<"Secretario"<<endl<<aumento<<endl<<novosalario;
break;
case(3):
aumento=salarioatual*0.20;
novosalario=salarioatual+aumento;
cout<<"Caixa"<<endl<<aumento<<endl<<novosalario;
break;
case(4):
aumento=salarioatual*0.10;
novosalario=salarioatual+aumento;
cout<<"Gerente"<<endl<<aumento<<endl<<novosalario;
break;
case(5):
aumento=salarioatual*0;
novosalario=salarioatual+aumento;
cout<<"Diretor"<<endl<<aumento<<endl<<novosalario;
break;
default:
cout<<"Codigo nao definido";
}
return 0;
}