0

How can i display the volume of a square as 1m^3 instead off 100000 cm^3?

14th Oct 2016, 8:37 AM
Reida
3 Answers
+ 1
You mean instead of 10000 cm^3? Just divide the result by 10000.
14th Oct 2016, 9:59 AM
Zen
Zen - avatar
0
yeah but how do i get the result output in m^3 instead off cm^3?
14th Oct 2016, 10:05 AM
Reida
0
public class Bsp01 { public static void main(String []args){ double H, L, B, V; System.out.println (); System. out.println ("H [cm]:"); H = SavitchIn.readLineDouble (); System.out.println("B [cm]:"); B = SavitchIn.readLineDouble(); System.out.println("L [cm]:"); L = SavitchIn.readLineDouble(); V = H * B * L; System.out.println(" V = " + V); System.out.println(); } } thats what i have so far! is ot correct?
14th Oct 2016, 10:12 AM
Reida