Skip to content

Instantly share code, notes, and snippets.

@leehs99
Created July 10, 2018 17:54
Show Gist options
  • Save leehs99/20c4c5cfd576010632d42fb6af8ad70e to your computer and use it in GitHub Desktop.
Save leehs99/20c4c5cfd576010632d42fb6af8ad70e to your computer and use it in GitHub Desktop.
import java.util.Scanner;
//Object : 그대로 입력하기2
//question : 입력이 주어진다. 입력은 최대 100줄로 이루어져 있고, 알파벳 소문자, 대문자, 공백, 숫자로만 이루어져 있다.
// 각 줄은 100글자를 넘지 않으며, 빈 줄이 주어질 수도 있고, 각 줄의 앞 뒤에 공백이 있을 수도 있다.
//Name : Hyeon Soo Lee
//Email : 99leehs@naver.com
public class ex06 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String str = sc.nextLine();
if (str.length()<=100 || str.isEmpty()) {
} else {
break;
}
System.out.println(str);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment