| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
- 자바스크립트
- 코딩
- Java
- 자바개발자
- db
- Codeup
- 운영체제
- 자바알고리즘
- 혼공컴운
- 자바
- 개발자
- React
- 프로세스
- 백엔드개발자
- 자바의정석
- 프로그래머스
- SpringBoot
- 개발자일기
- 국비지원코딩
- 리액트
- 프로그래머
- 미라클모닝
- 알고리즘
- 스프링부트
- 소셜로그인구현
- 데이터베이스
- 프로그래밍
- 코드업
- 백엔드
- 국비지원
- Today
- Total
목록Java (42)
초코딩(chocoding)
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] numArr = new int[10]; int k; for (int i = 0; i < numArr.length; i++) { numArr[i] = sc.nextInt(); } k = sc.nextInt(); System.out.println(numArr[k - 1]); sc.close(); } }
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int callR..
6-1) + 문제에서 더 추가함 class Student { public String name = "chanmi Kim"; public int ban = 2; public int no = 12345; public int kor = 100; public int eng = 100; public int math = 100; public String toString() { return "name: " + name + ", ban: " + ban + ", no: " + no + ", kor: " + kor + ", eng: " + eng + ", math: " + math + "\n"; } } public class Main { public static void main(String[] args) { Studen..
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String in..
import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int count = 0; int r = sc.nextInt(); int g = sc.nextInt(); int b = sc.nextInt(); for (int i = 0; i < r; i++) { for (int j = 0; j < g; j++) { for (int k = 0; k < b; k++) { System.out.printf("%d %d %d %n", i, j, k); count++; } } } System.out.println(count);..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num1 = sc.nextInt(); int num2 = sc.nextInt(); for (int i = 1; i
5-3) package j04_Array; public class Ex_example { public static void main(String[] args) { int[] arr = {10, 20, 30, 40, 50}; int sum = 0; for (int i = 0; i < arr.length; i++) { sum += arr[i]; } System.out.println(sum); } } 5-4) package j04_Array; public class Ex_example { public static void main(String[] args) { int[] [] arr = { {5, 5, 5, 5, 5}, {10, 10, 10, 10, 10}, {20, 20, 20, 20, 20}, {30, 3..
이 문제는 다섯 자리의 정수 1개를 입력받아 각 자리별로 나누어 출력하는 문제이다. package j01_basic; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw =..
이 문제는 단어 한 개를 입력받고 스펠링을 하나 하나 나누어 출력하는 문제였다. 처음에 바로 널문자가 나오기 전까지 반복문을 돌려서 하나하나 출력하면 되겠구나!! 라고 생각을 했는데 무슨 이유에서인지는 모르겠는데 char에 for문을 돌리고 null문자가 나오면 break해라 라는 반복문을 돌렸더니 에러가 떴다....! ㅎㅎ 지금 다시 해보았더니 (사실 어제 너무~~~ 졸려서 이거 오류가 왜 뜨는지까지 찾을 힘이...ㅎㅎ) import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; ..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); float f = scanner.nextFloat(); int numInt = (int)f; int numFloat = (int)((f - numInt) * 1000000); System.out.println(numInt); System.out.println(numFloat); } } import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new ..