using System;
namespace ConsoleApplication1
{
interface Addition
{
int Add();
}
interface Multiplication
{
int Multiply();
} class Compute:Addition,Multiplication
{
int x, y;
public Compute(int a, int b)
{
this.x = a;
this.y = b;
}
public int Add()
{
return (x + y);
}
public int Multiply()
{
return (x * y);
}
}
class Interface
{
static void Main(string[] args)
{
int a, b;
Console.Write(“Enter 2 nos:”);
a = Convert.ToInt32(Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
Compute ob1=new Compute(a,b);
Console.WriteLine(“Addition is:”+ob1.Add());
Console.WriteLine(“Multiplication is:”+ob1.Multiply());
Console.ReadLine();
}
}
}
namespace ConsoleApplication1
{
interface Addition
{
int Add();
}
interface Multiplication
{
int Multiply();
} class Compute:Addition,Multiplication
{
int x, y;
public Compute(int a, int b)
{
this.x = a;
this.y = b;
}
public int Add()
{
return (x + y);
}
public int Multiply()
{
return (x * y);
}
}
class Interface
{
static void Main(string[] args)
{
int a, b;
Console.Write(“Enter 2 nos:”);
a = Convert.ToInt32(Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
Compute ob1=new Compute(a,b);
Console.WriteLine(“Addition is:”+ob1.Add());
Console.WriteLine(“Multiplication is:”+ob1.Multiply());
Console.ReadLine();
}
}
}