doubles & rounding

I'm working on an ASCII version of battleship, and as part of the project, the hit/miss stats have to be printed out at the end. Because this is for a computer science course, my output has to be identical to the required output.

My program prints this:
Hit ratio: 66.66666666666667%
When it should be printing:
Hit ratio: 66.66666666666666%

Long won't get you any decimal places. There are two issues. One is that the accuracy of the operation is constrained by the particular floating-point implementation. The other is a question of adjusting and formatting the results that you get.