Search This Blog

This website completely moved to new domain. For latest content, visit www.programmingposts.com

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();
 
        }
    }
}

Output:


For C program :  c program to get the product of two numbers

5 comments:

  1. I appreciate the straightforward writing style. It makes the information accessible and enjoyable to read.servicenow classes

    ReplyDelete
  2. . Excellent content! Anyone interested in data engineering can benefit from a structured datastage course
    with practical examples and real-time project experience.

    ReplyDelete
  3. A well-written post with useful details. I appreciate the effort you put into explaining the topic clearly.ui path course

    ReplyDelete