๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

์•Œ๊ณ ๋ฆฌ์ฆ˜65

[์ฝ”๋“œ์—… ๊ธฐ์ดˆ 100์ œ-JAVA] 1071~1080๋ฒˆ 1071๋ฒˆ import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] a = br.readLine().split(" "); br.close(); PrintWriter pw = new PrintWriter(System.out); for (int i = 0; i < a.length; i++) { if (a[i].equals("0")) { break; } else { pw.println(a[i]); } } pw.f.. 2023. 3. 4.
[์ฝ”๋“œ์—… ๊ธฐ์ดˆ 100์ œ-JAVA] 1061~1070๋ฒˆ 1061๋ฒˆ import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); br.close(); PrintWriter pw = new PrintWriter(System.out); p.. 2023. 3. 4.
[์ฝ”๋“œ์—… ๊ธฐ์ดˆ 100์ œ-JAVA] 1051~1060๋ฒˆ 1051๋ฒˆ import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); br.close(); PrintWriter pw = new PrintWriter(System.out); i.. 2023. 3. 4.
[์ฝ”๋“œ์—… ๊ธฐ์ดˆ 100์ œ-JAVA] 1041~1050๋ฒˆ 1041๋ฒˆ import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); char a = st.nextToken().charAt(0); a = (char) (a + 1); br.close(); PrintWriter pw = new PrintWriter(System.out); pw.println(a); pw.flush(); pw... 2023. 3. 4.
[์ฝ”๋“œ์—… ๊ธฐ์ดˆ 100์ œ-C์–ธ์–ด] 1031~1040๋ฒˆ 1031๋ฒˆ #include int main() { int n; scanf("%d", &n); printf("%o", n); return 0; } โ˜… %d(10์ง„์ˆ˜ ํ˜•ํƒœ)๋กœ ์ž…๋ ฅ๋ฐ›๊ณ , %o๋ฅผ ์‚ฌ์šฉํ•ด ์ถœ๋ ฅํ•˜๋ฉด 8์ง„์ˆ˜(octal)๋กœ ์ถœ๋ ฅ๋œ๋‹ค. %d๋Š” 10์ง„์ˆ˜์˜ ์„œ์‹๋ฌธ์ž %o๋Š” 8์ง„์ˆ˜์˜ ์„œ์‹๋ฌธ์ž 1032๋ฒˆ #include int main() { int n; scanf("%d", &n); printf("%x", n); return 0; } %x ๋Š” 16์ง„์ˆ˜๋ฅผ ์†Œ๋ฌธ์ž๋กœ ์‚ฌ์šฉํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ์„œ์‹ ๋ฌธ์ž์ด๋‹ค. 1033๋ฒˆ #include int main() { int n; scanf("%d", &n); printf("%X", n); return 0; } %X ๋Š” 16์ง„์ˆ˜๋ฅผ ์†Œ๋ฌธ์ž๋กœ ์‚ฌ์šฉํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ์„œ์‹ ๋ฌธ์ž์ด๋‹ค. 10.. 2023. 2. 27.
[์ฝ”๋“œ์—… ๊ธฐ์ดˆ 100์ œ-C์–ธ์–ด] 1021~1030๋ฒˆ 1021๋ฒˆ #include int main() { char data[51]=""; scanf("%s", data); printf("%s", data); return 0; } %s ๋Š” ๋ฌธ์ž์—ด์— ์“ฐ์ด๋Š” ์„œ์‹ ๋ฌธ์ž์ด๋‹ค. 1022๋ฒˆ #include int main() { char data[2001]; fgets(data, 2000, stdin); printf("%s", data); return 0; } ๋„์–ด์“ฐ๊ธฐ๋ฅผ ํฌํ•จํ•œ ๋ฌธ์žฅ์„ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” fgets() ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. fgets(a, b, c) a ์—๋Š” ์ž…๋ ฅ๋ฐ›์€ ๊ฐ’์„ ์ €์žฅํ•  ๊ณต๊ฐ„์„ ์ž…๋ ฅํ•œ๋‹ค. b ์—๋Š” ์ž…๋ ฅ๋ฐ›์„ ๊ฐ’์„ ์ตœ๋Œ€ ๊ฐœ์ˆ˜๋ฅผ ๋„ฃ์–ด์ค€๋‹ค. c ์—๋Š” ํ‘œ์ค€ ์ž…๋ ฅ์„ ๋ฐ›๊ธฐ ์œ„ํ•œ stdin์„ ์ž…๋ ฅํ•œ๋‹ค. 1023๋ฒˆ #include int main() { int a,.. 2023. 2. 27.
๋ฐ˜์‘ํ˜•