Friday, 1 September 2017

c# programming tutorial to implement a Sum of Two number

Simple Program example to sum of two

Program

using System;
class Program
    {
        static void Main(string[] args)
        {
             int a, b, c;
             Console.WriteLine("Number 1:");            
 a = Convert.ToInt32(Console.ReadLine());            
             Console.WriteLine("Number 2:");
 b  = Convert.ToInt32(Console.ReadLine());
 c = a + b;
            Console.WriteLine("Addition: {0}", c);
        }

   }

Output


0 comments:

Post a Comment