using System;
namespace codingstudy
{
class Program
{
static void Main()
{
int t = int.Parse(Console.ReadLine()); // 테스트 케이스 입력
int sum = 0;
for (int i = 0; i < t; i++)
{
string[] s = Console.ReadLine().Split(); // 더할 값 입력
int num1 = int.Parse(s[0]);
int num2 = int.Parse(s[1]);
sum = num1 + num2;
Console.WriteLine($"Case #{i+1}: {num1} + {num2} = {sum}");
}
}
}
}
이전 문제의 코드에서 Console.WriteLine부분만 수정해주었다.
'C# > C# (백준)' 카테고리의 다른 글
[C#] 백준 알고리즘 10952번, A+B - 5 (0) | 2023.01.12 |
---|---|
[C#] 백준 알고리즘 2439번, 별 찍기 -2 (0) | 2023.01.12 |
[C#] 백준 알고리즘 11021번, A+B - 7 (0) | 2023.01.11 |
[C#] 백준 알고리즘 15552번, 빠른 A+B (0) | 2023.01.09 |
[C#] 백준 알고리즘 25304번, 영수증 (0) | 2022.12.29 |