원통의 부피

sanholee63 Reply 7 years 10 weeks ago
버림 코드를 어떻게 사용해야 되죠? import java.util.Scanner; public class Main { 5. public static void main(String[] args){ Scanner keyboard=new Scanner(System.in); 10. double Radius=keyboard.nextDouble(); double Length=keyboard.nextDouble(); while ((Radius > 1000) || (Radius < 1)) { 15. Radius = keyboard.nextDouble(); } while ((Length > 1000) || (Length < 1)) { 20. Length = keyboard.nextDouble(); } double Area=Radius*Radius*3.14159; 25. System.out.printf("%.1f\n",Area); double Velocity=(double)Radius*Radius*3.14159*Length; System.out.printf("%.1f\n",Velocity); 30. } 35.}
onacloud Reply 7 years 10 weeks ago
Math.floor 를 참고하세요
onacloud Reply 7 years 10 weeks ago
Math.floor(x*10)/10