롱엔서 질문합니다.

only1hour Reply 8 years 30 weeks ago
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner input= new Scanner(System.in); int n=input.nextInt(); double s=input.nextDouble(); double area = (n*s*s)/(4*Math.tan((Math.PI)/n)); System.out.println(Math.floor(100*area)/100); } } 인텔리제이에서 출력 잘되는데 왜 롱엔서가 나오는지 고민해봤는데.. 도저히 모르겠네요..
cjmp1 Reply 8 years 30 weeks ago
실수형은 소수점 제약없이 출력시 부동소수점형태로 출력됩니다