#2, I want to know the other way of decimal fomatting. Still a bit confused by it.
Type: Posts; User: javaBoi
#2, I want to know the other way of decimal fomatting. Still a bit confused by it.
Thanks for the reply.
I just typcasted the double into int (seems to work).
But, can you give me a sample of how your approach will work, too?
Okay, I was able to fix Issue #1.
Just had to add some padding to "%d".
Still can't figure out getting rid of the decimal places for the 80 and 120. I have "import java.text.DecimalFormat;" on...
Hi,
I'm having trouble formatting my output and issues with the decimal places. Here's my code:
import java.util.Scanner;
import java.text.DecimalFormat; // Imports DecimalFormat class for...