using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ArithmeticOperators
{
class Program
{
static void Main(string[] args)
{
int a = 199,b = 76,c;
c = a + b;
Console.WriteLine("Sum of 2 Digits :" + c);
int d = a - b;
Console.WriteLine("Difference of 2 Digits: " + d);
int e = a * b;
Console.WriteLine("Product of 2 Digits: " + e);
double f = (double)(a + b) / 2;
Console.WriteLine("Average of 2 Digits: " + f);
int g = a * a;
Console.WriteLine("Square of first digit: " + g);
int h = b * b;
Console.WriteLine("Square of second digit: " + h);
int i = a % b;
Console.WriteLine("Reminder of 2 Digits: " + i);
}
}
}
Tags:
csharp.net