본문 바로가기
자료실

[Java]자릿수를 출력하는 프로그램

by 페페군 2018. 6. 7.
반응형

public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("수를 입력 : "); int num = sc.nextInt(); String result = ""+num; System.out.println(result.length()+"자리수"); }

댓글