Answers for "multiplying int in c#"

C#
1

multiplying int in c#

using System;

namespace multiply{
  
  public class Program{

      public static int multiplication(int a, int b){
          return (a*b);
      }

      public static void Main(){
          int a,b;
          int product;

          Console.Write("Enter first number: ");
          a = Convert.ToInt32(Console.ReadLine());

          Console.Write("Enter second number: ");
          b = Convert.ToInt32(Console.ReadLine());

          product = multiplication(a,b);

          Console.WriteLine("Product is: " + product);
      }
  }
}
Posted by: Guest on August-28-2021

C# Answers by Framework

Browse Popular Code Answers by Language