operator_divi_mult.cs

// csc operator_divi_mult.cs
using System;
namespace arithmatic_operators
{
public class arith_matic
{
public int div;
public int mt;
public int mi;
public string s ="hello world";

public int division(int n1, int n2)
{
this.div = (n1/n2);
return div;
}
public int mult(int n1, int n2)
{
this.mt = (n1 * n2);
return mt;
}
public int minus(int n1, int n2)
{
this.mi = (n1 - n2);

return mi;
}
public int compare(int n1, int n2)
{

if(n1 < n2){
Console.WriteLine(" n2 is greater thatn n1");}
return 1;
}
}//end of class
class Test
{
public static void Main()
{

arith_matic a_r1 = new arith_matic();
arith_matic a_r2 = new arith_matic();
arith_matic a_r3 = new arith_matic();
Console.WriteLine(" Division / Operator " + a_r1.division(-4, 2));
Console.WriteLine(" Multiplication * Operator " + a_r2.mult(-4, 2));
Console.WriteLine(" Multiplication * Operator " + a_r3.compare(-4, 2));
Console.ReadLine();
}
}
}//end of the namespace