Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
Tags
- JavaScript
- like
- ๋ฐฐ์ด
- DATE_FORMAT
- ๋์ปค
- ๋ช ๋ น์ด
- ๋์ ํ ์ด๋ธ
- SQL
- ์๋ฐ์คํฌ๋ฆฝํธ
- optionํ๊ทธ
- ์ปจํธ๋กค๋ฌ
- Update
- ๋ฆฌ๋ ์ค
- JS
- select
- post๋ฐฉ์
- ํ๋ก๊ทธ๋๋จธ์ค
- ์ธ๋ผ์ธ๋ทฐ
- Ajax
- ํจ์
- ๋ณ์
- order by
- ๋์
- MySQL
- ์ฝํ
- oracle
- ํ ์ด๋ธ
- ๋ฐฑํฑ
- Spring
- JSP
Archives
- Today
- Total
bom's happy life
[JAVA] ๋ง์ ์ ์ถ๋ ฅํ๊ธฐ ๋ณธ๋ฌธ
๋ฌธ์ ์ค๋ช :
๋ ์ ์ a, b๊ฐ ์ฃผ์ด์ง ๋ ๋ค์๊ณผ ๊ฐ์ ํํ์ ๊ณ์ฐ์์ ์ถ๋ ฅํ๋ ์ฝ๋๋ฅผ ์์ฑํด ๋ณด์ธ์.
a + b = c
์ ํ์ฌํญ :
๐ 1 ≤ a, b ≤ 100
์ ์ถ๋ ฅ ์ :
์ ๋ ฅ #1
4 5
์ถ๋ ฅ #1
4 + 5 = 9
๋ฌธ์
import java.util.Scanner;
public class Solution {
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);
}
}
์ ๋ต 1
import java.util.Scanner;
public class Solution {
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 + " = " + (a + b));
}
}
์ ๋ต 2
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int sum = a + b;
System.out.println(a + " + " + b + " = " + sum);
}
}
'Algorithm๐ > ํ๋ก๊ทธ๋๋จธ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[JAVA] ๋ฌธ์์ด ๋๋ฆฌ๊ธฐ (0) | 2023.04.23 |
---|---|
[JAVA] ๋ฌธ์์ด ๋ถ์ฌ์ ์ถ๋ ฅํ๊ธฐ (0) | 2023.04.22 |
[JAVA] ํน์๋ฌธ์ ์ถ๋ ฅํ๊ธฐ (0) | 2023.04.22 |
[JAVA] ๋์๋ฌธ์ ๋ฐ๊ฟ์ ์ถ๋ ฅํ๊ธฐ (0) | 2023.04.22 |
[JAVA] ๋ฌธ์์ด ๋ฐ๋ณตํด์ ์ถ๋ ฅํ๊ธฐ (0) | 2023.04.22 |