Question
I have example of salary = 2000 and I want to increase the salary by a bonus of 50%, resulting in a salary of 3000.
So like:
salary = salary + 50% of the salary
Attempt
I tried implementing it like this:
int salary = 2000;
salary = salary + 50 % salary;
System.out.println(salary);
but I got 2050 as result, not 3000. What am I doing wrong?