using System;
class calculator
{
int a=0, b;
char option, d='y';
void insert()
{
while (d=='y')
{
option=Convert.ToChar(Console.ReadLine());
switch(option)
{
case '+':
b=Convert.ToInt32(Console.ReadLine());
a=a+b;
Console.WriteLine("Result of Addition : "+a);
break;
case '-':
b=Convert.ToInt32(Console.ReadLine());
a=a-b;
Console.WriteLine("Result of Addition : "+a);
break;
case '*':
b=Convert.ToInt32(Console.ReadLine());
a=a*b;
Console.WriteLine("Result of Addition : "+a);
break;
case '/':
b=Convert.ToInt32(Console.ReadLine());
a=a/b;
Console.WriteLine("Result of Addition : "+a);
break;
default:
Console.WriteLine("invalid value");
d='n';
break;
}
}
}
public static void Main (string[] a)
{
calculator cal=new calculator();
cal.insert();
}
}
class calculator
{
int a=0, b;
char option, d='y';
void insert()
{
while (d=='y')
{
option=Convert.ToChar(Console.ReadLine());
switch(option)
{
case '+':
b=Convert.ToInt32(Console.ReadLine());
a=a+b;
Console.WriteLine("Result of Addition : "+a);
break;
case '-':
b=Convert.ToInt32(Console.ReadLine());
a=a-b;
Console.WriteLine("Result of Addition : "+a);
break;
case '*':
b=Convert.ToInt32(Console.ReadLine());
a=a*b;
Console.WriteLine("Result of Addition : "+a);
break;
case '/':
b=Convert.ToInt32(Console.ReadLine());
a=a/b;
Console.WriteLine("Result of Addition : "+a);
break;
default:
Console.WriteLine("invalid value");
d='n';
break;
}
}
}
public static void Main (string[] a)
{
calculator cal=new calculator();
cal.insert();
}
}