Hello, I am trying to write a java method for calculating total annual salary. The method receives monthlySalary and monthlySales. The commission is 2% of monthly sales. The output has to be an int rounded to the nearest dollar. I can't seem to get it working and output "1245" instead of "1244.63" Please help!

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

You can try using Math.round(number)

And you may need to type cast it to turn it into an int.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.