출제 링크 : https://www.acmicpc.net/problem/1330 1330번: 두 수 비교하기 두 정수 A와 B가 주어졌을 때, A와 B를 비교하는 프로그램을 작성하시오. www.acmicpc.net 코드 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 using System; using static System.Console; namespace baekjoon { class Program { static void Main(string[] args) { string inputA = Console.ReadLine(); string[] inputA_arr = inputA.Split(); if (int.Parse(inputA_..
챕터 06 '메서드'입니다. 메서드를 이용하여 프로그램의 덩치가 커져도 여전히 간결하고 이해하기 좋게 소스 코드를 유지할 수 있는 방법을 배웁니다! '이것이 C#이다' 교재를 바탕으로 정리했습니다. 이전 정리 글 더보기 2020/01/06 - [이것이 C#이다] - Ch01 프로그래밍을 시작합시다. 2020/01/06 - [이것이 C#이다] - Ch02 처음 만드는 C# 프로그램 2020/01/06 - [이것이 C#이다] - Ch03 데이터 보관하기 2020/01/07 - [언어 공부/이것이 C#이다] - 부록 A. 문자열 다루기 2020/01/07 - [언어 공부/이것이 C#이다] - Ch04. 데이터를 가공하는 연산자 2020/01/08 - [언어 공부/이것이 C#이다] - Ch05 코드의 흐름 제어..
출제 링크 : https://www.acmicpc.net/problem/2588 2588번: 곱셈 첫째 줄부터 넷째 줄까지 차례대로 (3), (4), (5), (6)에 들어갈 값을 출력한다. www.acmicpc.net 코드 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 using System; using static System.Console; namespace baekjoon { class Program { static void Main(string[] args) { string inputA = Console.ReadLine(); // 첫번째 입력 string inputB = Console.ReadLine(); // 두번째 ..
출제 링크 : https://www.acmicpc.net/problem/10430 10430번: 나머지 첫째 줄에 A, B, C가 순서대로 주어진다. (2 ≤ A, B, C ≤ 10000) www.acmicpc.net 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 using System; using static System.Console; namespace baekjoon { class Program { static void Main(string[] args) { string input = ReadLine(); string[] arr_input = input.Split(); int a = int.Parse(arr_input[0]); int..
출제 링크 : https://www.acmicpc.net/problem/10869 10869번: 사칙연산 두 자연수 A와 B가 주어진다. 이때, A+B, A-B, A*B, A/B(몫), A%B(나머지)를 출력하는 프로그램을 작성하시오. www.acmicpc.net 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 using System; using static System.Console; namespace baekjoon { class Program { static void Main(string[] args) { string input = ReadLine(); string[] arr_input = input.Split(); WriteLine(int.Parse..
출제 링크 : https://www.acmicpc.net/problem/1008 1008번: A/B 두 정수 A와 B를 입력받은 다음, A/B를 출력하는 프로그램을 작성하시오. www.acmicpc.net 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 using System; namespace baekjoon { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] arr_input = input.Split(); Console.WriteLine(double.Parse(arr_input[0]) / double.Parse(arr_input[1])); } } } * 소수 9..
출제 링크 : https://www.acmicpc.net/problem/10998 10998번: A×B 두 정수 A와 B를 입력받은 다음, A×B를 출력하는 프로그램을 작성하시오. www.acmicpc.net 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 using System; namespace baekjoon { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] arr_input = input.Split(); Console.WriteLine(int.Parse(arr_input[0]) * int.Parse(arr_input[1])); } } } * 1000문제와 ..
출제 링크 : https://www.acmicpc.net/problem/1001 1001번: A-B 두 정수 A와 B를 입력받은 다음, A-B를 출력하는 프로그램을 작성하시오. www.acmicpc.net 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 using System; namespace baekjoon { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] arr_input = input.Split(); Console.WriteLine(int.Parse(arr_input[0])- int.Parse(arr_input[1])); } } } * 다를껀 없다. 100..
출제 링크 : https://www.acmicpc.net/problem/1000 1000번: A+B 문제 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 A와 B가 주어진다. (0 < A, B < 10) 출력 첫째 줄에 A+B를 출력한다. 예제 입력 1 복사 1 2 예제 출력 1 복사 3 힌트 여기를 누르면 1000번 예제 소스를 볼 수 있습니다.... www.acmicpc.net 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 using System; namespace baekjoon { class Program { static void Main(string[] args) { string input = Console.ReadLine();..
재호우96
'분류 전체보기' 카테고리의 글 목록 (24 Page)