JAVA #3 : Format 명령어를 이용한 숫자의 자릿수 출력하기
#3 :임의의 숫자를 입력 받아서 자릿수를 출력하시오. 숫자를 입력 받아서 자릿수를 자동으로 구분하게 만들어 주는 명령어는 없을까? Fomat 명령어 중 DecimalFormat 명령어를 사용하면 자릿수를 구분해서 숫자를 출력할 수 있다 아래와 같이 임의의 숫자를 입력 받고 DecimalFormat을 사용해 자릿수 포멧을 설정 할 수있다 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import java.text.DecimalFormat; public class ll { public static void main(String[] args) { double a= 123456789.123; DecimalFormat df =new DecimalFormat(); df = new DecimalForm..