/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
double width;
double height;
double depth;
double volume() {
return width*height*depth;
}
}
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
double vol;
mybox1.width = 10;
mybox1.height = 5;
mybox1.depth = 6;
mybox2.width = 9;
mybox2.height = 4;
mybox2.depth = 5;
vol = mybox1.volume();
System.
out.
println("Объем первой коробки равен " + vol
); vol = mybox2.volume();
System.
out.
println("Объем второй коробки равен " + vol
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmNsYXNzIEJveCB7CiAgICBkb3VibGUgd2lkdGg7CiAgICBkb3VibGUgaGVpZ2h0OwogICAgZG91YmxlIGRlcHRoOyAgICAKCmRvdWJsZSB2b2x1bWUoKSB7CiAgICByZXR1cm4gd2lkdGgqaGVpZ2h0KmRlcHRoOwp9Cn0KLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlCb3ggbXlib3gxID0gbmV3IEJveCgpOwogICAgICAgIEJveCBteWJveDIgPSBuZXcgQm94KCk7CiAgICAgICAgZG91YmxlIHZvbDsKICAgICAgICBteWJveDEud2lkdGggPSAxMDsKICAgICAgICBteWJveDEuaGVpZ2h0ID0gNTsKICAgICAgICBteWJveDEuZGVwdGggPSA2OwogICAgICAgIG15Ym94Mi53aWR0aCA9IDk7CiAgICAgICAgbXlib3gyLmhlaWdodCA9IDQ7CiAgICAgICAgbXlib3gyLmRlcHRoID0gNTsKIC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