package class2_3; import java.util.Scanner; public class Example { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Enter depth: "); double depth = in.nextDouble(); double volume; if (depth > 3) { volume = (depth-3)+3*2; } else { volume = (depth*2); } System.out.println("Volume: "+volume); // ... } }