C# Program To Calculate Square And Cube Of Given Number

/* C# Program To Calculate Square And Cube Of Given Number */
using System;
public class Demo
{
    public static void Main(string[] args)
    {
        int Number = 4, Square, Cube;

        Square = Number * Number;
        Cube = Number * Number * Number;

        Console.Write("Number is : " + Number);
        Console.Write("\nSquare of " + Number + " is : " + Square);
        Console.Write("\nCube of " + Number + " is : " + Cube);
        Console.ReadLine();
    }
}

Output :
Number is : 4
Square of 4 is : 16
Cube of 4 is : 64



Leave a comment