Arithmetic Operators

 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);
             }
      }
}

Share Your Comments
Previous Hello World! program in C#
Next Java Project - Store Management System

About author

Aamir Shaikh
Aamir Shaikh 1705 posts

<p>A Blogger, SEO Analyst and passionate Web Developer from India.<br /> Believes in hard work and continues working to achieve success.</p>

View all posts by this author →

You might also like