어디가 틀렸는지 알고싶습니다.

yangshmd Reply 8 years 33 weeks ago
처음에 println으로 출력했었는데 숫자가 커지니 과학적표기법(e등장)나와서 printf로 했는데 Presentation Error가 자꾸 뜹니다. import java.util.*; public class Main { public static void main(String[] args) { Scanner a = new Scanner(System.in); double R, L; double A, V; double A1, V1; R = a.nextDouble(); L = a.nextDouble(); A = R * R * 3.14159; V = L * A; A1 = Math.floor(A*10d)/10d; V1 = Math.floor(V*10d)/10d; System.out.printf("%.1f \n",A1); System.out.printf("%.1f \n",V1); } }
withcs1 Reply 8 years 33 weeks ago
"%.1f \n" ->"%.1f\n" 차이가 보이시나요?