반응형
1. print()를 이용해 다음 단어를 출력하시오.
출력 예)
Hello
System.out.print("Hello")
2. println()를 이용해 다음 단어를 출력하시오.
출력 예)
Hello World
System.out.println("Hello World")
3. 줄을 바꿔 다음 단어를 출력하시오.
출력 예)
Hello
World
System.out.println("Hello\nWorld")
4. 작은 따옴표가 들어있는 다음 단어를 출력하시오.
출력 예)
'Hello World'
System.out.println("\'Hello World\'")
5.큰 따옴표가 들어있는 다음 단어를 출력하시오.
출력 예)
"Hello World"
System.out.println("\"Hello World\"")
6. 특수문자 들어있는 다음 단어를 출력하시오.
출력 예)
"!@#$%^&*()"
System.out.println("\"!@#$%^&*()\"")
7. 윈도우 운영체제의 파일 경로를 출력하시오.
출력 예)
"C:\Download\hello.cpp"
System.out.println("\"C:\\Download\\hello.cpp\"")
8. 아래와 같은 특수 문를 출력하시오.
출력 예)
┌┬┐
├┼┤
└┴┘
System.out.println("┌┬┐\n├┼┤\n└┴┘")
반응형