Answers for "divide expressions c#"

C#
1

divide int in c#

using System;

namespace Divide{
  
  public class Program{

      public static int division(int a, int b){
          return (a/b);
      }

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

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

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

          quotient = division(a,b);

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

C# Answers by Framework

Browse Popular Code Answers by Language