어떤부분을 고쳐야 할까요? 입력값이 음수이거나 너무 큰경우를 제외해야 하나요?
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("반지름을 입력하세요 : ");
double radius = input.nextDouble();
System.out.print("높이를 입력하세요 : ");
double hight = input.nextDouble();
double A=radius*radius*3.14159;
double V=A*hight;
int a=(int)(A*10);
int v=(int)(V*10);
System.out.printf("%.1f\n%.1f\n",a/10.0,v/10.0);
}
}