public static void Main()
Console.WriteLine("*** Painting Calculator ***");
Console.WriteLine("This application will calculate the area and coat to paint rectangle, circle, triangle, and hexagon shapes that have been drawn on the asphalt of the school yard.");
static void RectangleCalculations()
Console.WriteLine("\n*** Rectangle ***");
Console.Write("\nEnter the length of the rectangle in metres:");
double length = Convert.ToDouble(Console.ReadLine());
Console.Write("\nEnter the width of the rectangle in meters:");
double width = Convert.ToDouble(Console.ReadLine());
double area = length * width;
Console.WriteLine("\nThe area to paint is " + ((length * width)) + "m\u00B2.");
double paintNeeded = area / 10;
Console.WriteLine("\nYou will need " + paintNeeded + " litres of paint.");
Console.Write("Enter the cost per litre of paint in dollars (between $15 and $25):");
double pricePerLitre = Convert.ToDouble(Console.ReadLine());
double totalCost = Math.Round(paintNeeded * pricePerLitre, 1);
Console.WriteLine($"\nThe total cost to paint the rectangle is: ${totalCost}.");
static void CircleCalculations()
Console.WriteLine("*** Circle ***");
Console.Write("\nEnter the radius of the circle:");
double radius = Convert.ToDouble(Console.ReadLine());
double area = Math.PI * Math.Pow(radius, 2);
area = Math.Round(area,1);
Console.WriteLine("\nThe area of a circle with a radius of " + radius + "m is " + area + "m\u00B2");
double paintNeeded = Math.Round(area / 10, 1);
Console.WriteLine($"\nYou will need {paintNeeded} litres of paint.");
Console.Write("\nEnter the cost per litre of paint in dollars (between $15 and $25): ");
double pricePerLitre = Convert.ToDouble(Console.ReadLine());
double totalCost = Math.Round(paintNeeded * pricePerLitre, 1);
Console.WriteLine($"\nThe total cost to paint the circle is: ${totalCost}.\n");
static void TriangleCalculations()
Console.WriteLine("*** Triangle ***");
Console.Write("\nEnter the base of the triangle:");
double baseLength = Convert.ToDouble(Console.ReadLine());
Console.Write("\nEnter the height of the triangle in metres: ");
double height = Convert.ToDouble(Console.ReadLine());
double area = Math.Round(0.5 * baseLength * height, 1);
Console.WriteLine($"\nThe area to paint is {area}m\u00B2.");
double paintNeeded = Math.Round(area / 10, 1);
Console.WriteLine($"\nYou will need {paintNeeded} litres of paint.");
Console.Write("\nEnter the cost per litre of paint in dollars (between $15 and $25): ");
double pricePerLitre = Convert.ToDouble(Console.ReadLine());
double totalCost = Math.Round(paintNeeded * pricePerLitre, 1);
Console.WriteLine($"\nThe total cost to paint the triangle is: ${totalCost}.\n");
static void HexagonCalculations()
Console.WriteLine("*** Hexagon ***");
Console.Write("\nEnter the side length of the hexagon:");
double sideLength = Convert.ToDouble(Console.ReadLine());
double area = Math.Round((3 * Math.Sqrt(3) * Math.Pow(sideLength, 2)) / 2, 1);
Console.WriteLine($"\nThe area to paint is {area}m\u00B2.");
double paintNeeded = Math.Round(area / 10, 1);
Console.WriteLine($"\nYou will need {paintNeeded} litres of paint.");
Console.Write("\nEnter the cost per litre of paint in dollars (between $15 and $25): ");
double pricePerLitre = Convert.ToDouble(Console.ReadLine());
double totalCost = Math.Round(paintNeeded * pricePerLitre, 1);
Console.WriteLine($"\nThe total cost to paint the hexagon is: ${totalCost}.\n");