반응형
자바로 코딩테스트를 준비하기 위해 기초를 다진다고 생각하고 풀어보려한다! 하루에 10개씩 해보자!
# 1001
public class Main {
public static void main(String[] args) {
System.out.println("Hello");
}
}
# 1002
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
# 1003
public class Main {
public static void main(String[] args) {
System.out.println("Hello\nWorld");
}
}
# 1004
public class Main {
public static void main(String[] args) {
System.out.println("\'Hello\'");
}
}
# 1005
public class Main {
public static void main(String[] args) {
System.out.println("\"Hello World\"");
}
}
# 1006
public class Main {
public static void main(String[] args) {
System.out.println("\"!@#$%^&*()\"");
}
}
# 1007
public class Main {
public static void main(String[] args) {
System.out.println("\"C:\\Download\\hello.cpp\"");
}
}
# 1008
public class Main {
public static void main(String[] args) {
System.out.println("\u250C\u252C\u2510");
System.out.println("\u251C\u253C\u2524");
System.out.println("\u2514\u2534\u2518");
}
}
# 1010
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(n);
}
}
# 1011
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char x = sc.next().charAt(0);
System.out.println(x);
}
}
반응형
'개인 공부 > JAVA' 카테고리의 다른 글
[JAVA] Code Up 기초 100제 (1063 ~ 1072) (0) | 2021.06.23 |
---|---|
[JAVA] Code Up 기초 100제 (1053 ~ 1062) (0) | 2021.06.22 |
[JAVA] Code Up 기초 100제 (1043 ~ 1052) (0) | 2021.06.21 |
[JAVA] Code Up 기초 100제 (1033 ~ 1042) (0) | 2021.06.20 |
[JAVA] Code Up 기초 100제 (1023 ~ 1032) (0) | 2021.06.19 |