using System;
class MathOpsApp
{
static void Main(string[] args)
{
Random rand = new Random();
int a, b, c;
a = rand.Next() % 100; // Limit max to 99.
b = rand.Next() % 100; // Limit max to 99.
Console.WriteLine("a={0} b={1}", a, b);
c = a * b;
Console.WriteLine("a * b = {0}", c);
c = a / b;
Console.WriteLine("a / b = {0}", c);
c = a + b;
Console.WriteLine("a + b = {0}", c);
c = a - b;
Console.WriteLine("a - b = {0}", c);
c = a % b;
Console.WriteLine("a % b = {0}", c);
}
}
|