Pages

Monday, 29 January 2018

C# PROGARM TO GET PRODUCT OF TWO NUMBERS

C# PROGARM TO GET PRODUCT OF TWO NUMBERS
using System;

namespace ProductOfTwoNumbers
{
    class Program
    {
        static void Main(string[] args)
        {


            int x, y;
            int result;
            Console.Write("\n Enter the first number : ");
            x = Convert.ToInt32(Console.ReadLine());  /* reading 1st number from user*/
            Console.Write("\n Enter the second number: ");
            y = Convert.ToInt32(Console.ReadLine());  /* reading 2nd number from user*/
            result = x * y;    /* storing the product in result*/
            Console.WriteLine("\n The product of two numbers is: {0} \n", result);
            Console.ReadLine();

        }
    }

}