1
I have an exercise to do which consists of the following:
The user informs the salary, and depending on the amount informed, he earns an increase according to the table. Example: From 1000 to 1500 he earns 10% From 1500 to 2000 he earns 5% 2000 upwards he earns no increase.
I thought to make using several ifs
, but in case, it would be better to use switch
? Why?
hello, have you developed an algorithm for the task ? explain what this analysis of the average wage consists of, because from what you have described there, you can take different approaches, which may not be the most appropriate for the situation in question, or simply provide the exercise in its integrity.
– Edilson
I had described it wrong. Then the user informs the salary, and depending on the amount informed, he earns an increase according to the table. Example: From 1000 to 1500 he earns 10% From 1500 to 2000 he earns 5% 2000 upwards he earns no increase. I think as the friend down there answered, it will be with several ifs same!
– Funny Dog