2. To print variables, join them together with text using a plus sign.
http://ideone.com/0JEDpd
Purpose: Allows a user to input the height and width of a rectangle and produces the area and perimeter.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ch3Q3
{
class Ch3Q3
{
static void Main(string[] args)
{
double rectHeight;
double rectLength;
Console.WriteLine("Rectangle Area & Perimeter Calculator\n");
Console.WriteLine("Please enter the height of the rectangle: ");
Console.WriteLine("Please enter the width of the rectangle: ");
Console.Read();
Console.WriteLine("The area of the rectangle is: ", rectHeight * rectLength);
Console.WriteLine("The perimeter of the rectangle is: ", (rectHeight * 2) + (rectLength * 2));
Console.ReadKey();
}
}
}