Question #325437

create a console application in area of the square


Expert's answer

using System;

namespace area_square
{
    class Program
    {
        public static void Main(string[] args)
        {
            int side, square;
            Console.Write("Enter length of side: ");
            side = Convert.ToInt32(Console.ReadLine());
            square = side * side;
            Console.WriteLine("Area of the square: {0}\n", square);
            
            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
    }
}
LATEST TUTORIALS
APPROVED BY CLIENTS