Original Post
🔒 Locked
[java] Percent
Advertisement
Well,
it is enough if you cast just the denominator to float/double.
And this statement
should work as intended (returning a float number with all those decimal places you may ever need).
Petr Stedry
it is enough if you cast just the denominator to float/double.
And this statement
System.out.println((x/(float)y)+" %");
should work as intended (returning a float number with all those decimal places you may ever need).
Petr Stedry
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement