YTU OJ 1094: A+B for Input-Output Practice (VII)

YTU OJ 1094: A+B for Input-Output Practice (VII)

在这里插入图片描述

using System;
class Program
{
    
    
    static void Main(string[] args)
    {
    
    
        string num;
        var a = 0;
        var b = 0;
        while(String.IsNullOrEmpty(num = Console.ReadLine())==false)
        {
    
    
            var num1 = num.Split(' ');
            var x = int.TryParse(num1[0], out a);
            var y = int.TryParse(num1[1], out b);
            Console.WriteLine(a + b);
            Console.WriteLine();
        }
    }
}

猜你喜欢

转载自blog.csdn.net/henishu/article/details/115085485