logo image

C# program to multiply given two numbers

32


Following program shows you how to multiply given two numbers. In this program we get inputs from user and multiplies those two inputs

using System;

class MainClass {
  public static void Main (string[] args) {
     Console.WriteLine("Enetr first number:");
    int input1 = Convert.ToInt32(Console.ReadLine());
      Console.WriteLine("Enetr second number:");
    int input2 = Convert.ToInt32(Console.ReadLine());
    int result = input1 * input2;
      Console.WriteLine("Multiplication of given two numbers is: " + result);
  }
}

Output:

Enetr first number:
 15
Enetr second number:
 15
Multiplication of given two numbers is: 225