box.java 390 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
public class box {

    public float ancho=5;
    public float largo=10;
    public float altura=8;

    public float volumen;
   
   
    public static void main(String[] args) {
        box cal = new box();
        cal.calcular_volumen();
    }

    public void calcular_volumen() {
        volumen = ancho*largo*altura;

        System.out.println("El volumen es: "+volumen);
    }

}