Input an integer

using System;
class Program
{
    public static void Main(String[] args)
    {
        int x,y;
        string a,b;
        Console.WriteLine("Enter the first Number:");
        a = Console.ReadLine();
        Console.WriteLine("Enter the second Number:");
        b = Console.ReadLine();
        x = int.Parse(a);
        y = int.Parse(b);
        int res = x+y;
        Console.WriteLine("The addition is: " + res);
    }
}

No comments:

Post a Comment