본문 바로가기

자바137

[백준/Java] 11654번 아스키 코드 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char ch = sc.next().charAt(0); int ascii = (int)ch; System.out.println(ascii); } } 2022. 4. 13.
[백준/Java] 11382번 꼬마 정민 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); System.out.println(a + b + c); } } 2022. 4. 12.
[백준/Java] 11283번 한글 2 -Code import java.util.Scanner; public class _11283 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char ch = sc.next().charAt(0); int num = (int) ch; System.out.println(num - 44031); } } 2022. 4. 12.
[백준/Java] 10998번 A×B -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a * b); } } 2022. 4. 12.
[백준/Java] 10926번 ??! -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); System.out.println(s + "??!"); } } 2022. 4. 12.
[백준/Java] 10869번 사칙연산 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a + b); System.out.println(a - b); System.out.println(a * b); System.out.println(a / b); System.out.println(a % b); } } 2022. 4. 12.