View
1001
System.out.print("Hello");
1002
System.out.print("Hello World");
1003
System.out.printf("Hello%nWorld");
1004
System.out.printf("\'Hello\'");
1005
System.out.printf("\"Hello World\"");
1006
System.out.printf("\"!@#$%%^&*()\"");
1007
System.out.printf("\"C:\\Download\\hello.cpp\"");
1008
System.out.printf("\u250C\u252C\u2510");
System.out.println();
System.out.printf("\u251C\u253C\u2524");
System.out.println();
System.out.printf("\u2514\u2534\u2518");
1010
Scanner Input = new Scanner(System.in);
int Data = Integer.parseInt(Input.nextLine());
System.out.printf("%d",Data);
1011
Scanner Input = new Scanner(System.in);
char x = Input.nextLine().charAt(0);
System.out.printf("%c",x);
1012
Scanner Input = new Scanner(System.in);
float x = Input.nextFloat();
System.out.printf("%f",x);
1013
Scanner Input = new Scanner(System.in);
int a,b;
a = Input.nextInt();
b = Input.nextInt();
System.out.printf("%d %d",a,b);
1014
Scanner Input = new Scanner(System.in);
char x,y;
String str;
str = Input.nextLine();
x = str.charAt(0);
y = str.charAt(2);
System.out.printf("%c %c",y,x);
1015
Scanner Input = new Scanner(System.in);
float x = Input.nextFloat();
System.out.printf("%.2f",x);
1016
Scanner Input = new Scanner(System.in);
int x = Input.nextInt();
System.out.printf("%d %d %d", x, x, x);
1018
Scanner Input = new Scanner(System.in);
int x,y;
String str = Input.nextLine();
String[] time = str.split(":");
x = Integer.parseInt(time[0]);
y = Integer.parseInt(time[1]);
System.out.printf("%d:%d",x,y);
1019
Scanner Input = new Scanner(System.in);
int year,month,day;
String str = Input.nextLine();
String[] time = str.split("\\.");
year = Integer.parseInt(time[0]);
month = Integer.parseInt(time[1]);
day = Integer.parseInt(time[2]);
System.out.printf("%d.%02d.%02d",year,month,day);
1020
Scanner Input = new Scanner(System.in);
String str = Input.nextLine();
String Id = str.replace("-", "");
System.out.print(Id);
'Coding Test > CodeUp1000' 카테고리의 다른 글
Code Up 기초 100제 JAVA 풀이 (1091~1099) (0) | 2021.01.25 |
---|---|
Code Up 기초 100제 JAVA 풀이 (1071~1090) (0) | 2021.01.19 |
Code Up 기초 100제 JAVA 풀이 (1042~1070) (0) | 2021.01.14 |
Code Up 기초 100제 JAVA 풀이 (1021~1040) (0) | 2021.01.06 |
reply