CSharp - Write program to perform four basic arithmetic operations

Requirements

You are working with numbers and performing all four basic arithmetic operations.

You will write a program that accepts two decimal numbers from the user and displays the results of their addition, subtraction, multiplication, and division.

Hint

The basic arithmetic operations are: + - * /

Demo

using System;
class Program{//from ww w.  java2s .co  m
    static void Main(string[] args){
        // Inputs 
        Console.Write("Enter first number: ");
        string input1 = Console.ReadLine();
        double number1 = Convert.ToDouble(input1);

        Console.Write("Enter second number: ");
        string input2 = Console.ReadLine();
        double number2 = Convert.ToDouble(input2);

        // Calculations 
        double sum = number1 + number2;
        double difference = number1 - number2;
        double product = number1 * number2;
        double quotient = number1 / number2;

        // Output 
        Console.WriteLine("Sum is " + sum);
        Console.WriteLine("Difference is " + difference);
        Console.WriteLine("Product is " + product);
        Console.WriteLine("Quotient is " + quotient);
    }
}

Result