[백준] 11718번 JAVA - 그대로 출력하기 (문자열) 공백포함하여 입력받아 출력해야 하니 nextLine() 함수를 사용한다. 1 2 3 4 5 6 7 8 9 10 11 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()) { System.out.println(sc.nextLine()); } } } Colored by Color Scripter cs 2023. 7. 30. 이전 1 다음