Java math problems

why doesn’t this work (line 327)
Repl link: - Geometry Calculator (Fourmulas) - Replit

code snippet
public static double saOfCone(int x) {
    out.println("\n The surface area of a cone is pi*r^2*pi*r*sqrt(r^2+h^2). Very complicated!");
    out.println(" Please enter the radius of the cone: ");
    double radius = input.nextDouble();
    out.println(" Please enter the height of the cone: ");
    double height = input.nextDouble();
    double y = radius * radius + height * height;
    double surfaceArea = Math.PI * radius * radius * Math.PI * radius * sqrt(y);
    return surfaceArea;

Nevermind. I fixed it.
sorry for wasting your time.

1 Like

Hi @Piano12 you didn’t waste anyone’s time, but I’m really glad you managed to solve your own issue!

1 Like