C#/알고리즘
3. 10952번 A+B-5
dev_sr
2020. 4. 7. 23:20
1. A 공백 B (A B) 를 입력 받아서
2. A값과 B값을 더하고 값을 출력하기
3. 0 공백 0 (0 0) 을 입력 받으면 종료
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
32
33
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _10952
{
class Program
{
static void Main(string[] args)
{
while (true)
{
string input = Console.ReadLine();
int a = int.Parse(nums[0]);
int b = int.Parse(nums[1]);
if (a == 0 && b == 0)
{
break;
}
Console.WriteLine(a + b);
}
}
}
}
|
출처