Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double weightPounds = (195);
- double weightKilos = (weightPounds/2.205);
- double weightStones = (weightPounds/14);
- weightKilos = (weightKilos*10); // Rounding, because this gives an ugly number
- weightKilos = Math.round(weightKilos);
- weightKilos = (weightKilos/10);
- weightStones = (weightStones*10); // Rounding, because this gives an ugly number
- weightStones = Math.round(weightStones);
- weightStones = (weightStones/10);
- System.out.println("The weight in kilograms is: "+weightKilos);
- System.out.println("The weight in stones is: "+weightStones);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement