백준 BOJ C# 1000
2020. 1. 8. 20:17ㆍ백준 알고리즘 단계별/입출력과 사칙연산
반응형
출제 링크 : https://www.acmicpc.net/problem/1000
코드
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]));
}
}
}
|
Split() 로 입력받은 문자값을 배열로 저장
split 메소드는
2020/01/07 - [언어 공부/이것이 C#이다] - 부록A. 문자열 다루기
에서 다뤘었다.
반응형