using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baekjoon
{
class Program
{
static void Main(string[] args)
{
while (true)
{
string input = Console.ReadLine();
if (input == null) break;
string[] n = input.Split();
int x = int.Parse(n[0]);
int y = int.Parse(n[1]);
Console.WriteLine(x+y);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baekjoon
{
class Program
{
static void Main(string[] args)
{
while (true)
{
string[] input = Console.ReadLine().Split();
try
{
int x = int.Parse(input[0]);
int y = int.Parse(input[1]);
Console.WriteLine(x + y);
}
catch
{
break;
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baekjoon
{
class Program
{
static void Main(string[] args)
{
while (true)
{
string[] input = Console.ReadLine().Split();
if (input != null)
{
int x = int.Parse(input[0]);
int y = int.Parse(input[1]);
Console.WriteLine(x + y);
}
else
{
break;
}
}
}
}
}
- 에러 발생 잡기 :
try...catch...
- 에러 발생시키기 :
throw