static double sideLength;
static double paintAmount;
Console.WriteLine("Enter the length of the rectangle in metres: ");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
length = Convert.ToDouble(strTemp);
Console.WriteLine("Please input a valid length in numeric form!");
Console.WriteLine("Enter the width of the rectangle in metres: ");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
width = Convert.ToDouble(strTemp);
Console.WriteLine("Please input a valid width in numeric form!");
paintAmount = (length * width) / 10;
Console.WriteLine("You will need to paint " + Math.Round((paintAmount * 10),1) + "m\u00B2, requiring about " + Math.Round(paintAmount,1) + " litres of paint.");
Console.WriteLine("Enter the base of the triangle in metres: ");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
tBase = Convert.ToDouble(strTemp);
Console.WriteLine("Please input a valid base length in numeric form!");
Console.WriteLine("Enter the height (altitude) of the triangle in metres: ");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
height = Convert.ToDouble(strTemp);
Console.WriteLine("Please input a valid height in numeric form!");
paintAmount = (0.5 * tBase * height) / 10;
Console.WriteLine("You will need to paint " + Math.Round((paintAmount * 10),1) + "m\u00B2, requiring about " + Math.Round(paintAmount,1) + " litres of paint.");
Console.WriteLine("Enter the radius of the circle in metres: ");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
radius = Convert.ToDouble(strTemp);
Console.WriteLine("Please input a valid radius in numeric form!");
paintAmount = (Math.PI * Math.Pow(radius,2)) / 10;
Console.WriteLine("You will need to paint " + Math.Round((paintAmount * 10),1) + "m\u00B2, requiring about " + Math.Round(paintAmount,1) + " litres of paint.");
Console.WriteLine("Enter the side length of the hexagon in metres: ");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
sideLength = Convert.ToDouble(strTemp);
Console.WriteLine("Please input a valid side length in numeric form!");
paintAmount = ((3 * Math.Sqrt(3) * Math.Pow(sideLength,2)) / 2) / 10;
Console.WriteLine("You will need to paint " + Math.Round((paintAmount * 10),1) + "m\u00B2, requiring about " + Math.Round(paintAmount,1) + " litres of paint.");
Console.WriteLine("How much does your paint cost per litre in dollars?");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
paintCost = Convert.ToDouble(strTemp);
Console.WriteLine("Please input the cost of your paint per litre in numeric form!");
Console.WriteLine("Is the price of your paint the same as last time? Reply \"yes\" or \"no\".");
while (paintBool == false)
string paintAns = Console.ReadLine();
paintAns = paintAns.ToLower();
Console.WriteLine("How much does your paint cost per litre in dollars?");
string strTemp = Console.ReadLine();
bool isNum = double.TryParse(strTemp, out double _);
paintCost = Convert.ToDouble(strTemp);
Console.WriteLine("Please input the cost of your paint per litre in numeric form!");
else if (paintAns == "yes")
Console.WriteLine("Please give a valid answer!");
Console.WriteLine("The total cost to paint your " + shapeName + " will be $" + Math.Round((paintCost * paintAmount),1));
Console.WriteLine("You might want to buy a cheaper paint, too? There's plenty of good quality ones at a lower price.");
Console.WriteLine("You might want to buy a higher quality paint, too? I wouldn't trust that price.");
public static void Main()
Console.WriteLine("Jim's Highly Practical And Useful Paint Cost and Amount Calculator For All Needs Involving Paint and Select Shapes");
Console.WriteLine("Hello ladies and gentlemen! Tonight I present you with an unforgettable creation of mine, a creation so practical and useful it rivals the likes of the new ASUS Vivo 22 64GB Ram 512GB Hard Drive (get it today in stores now)! (Sponsored)");
Console.WriteLine("Now, you may be asking, \"Why, when would I ever use this?\", and to that I say, good point! But, if you REALLY need to calculate some shapes you're going to be painting, you're just in luck!");
Console.WriteLine("To begin, please pick a shape! We can only offer you the rectangle, triangle, circle, and equilateral hexagon right now. (Note: all calculations will be rounded to one decimal place.)");
shapeName = Console.ReadLine();
shapeName = shapeName.ToLower();
case "equilateral hexagon":
Console.WriteLine("Plese choose a valid shape! Only say the name of the shape and nothing else; \"circle\" is fine, \"the circle\" is not! Our bot is a bit dumb, sorry.");
Console.WriteLine("Do you need to calculate another shape? Reply \"yes\" or \"no\".");
string affirmative = Console.ReadLine();
affirmative = affirmative.ToLower();
else if (affirmative == "yes")
Console.WriteLine("Please pick another shape! Rectangle, circle, triangle, hexagon.");
Console.WriteLine("Please give a valid answer!");
while (finished == false);
Console.WriteLine("Thank you for using Jim's Highly Practical And Useful Paint Cost and Amount Calculator blahblah I don't get paid enough.");
Console.WriteLine("We hope you come again soon! Don't mind the screams coming from the basement as you exit the store.");
Console.WriteLine("Oh, and make sure to check out our sister business TEMU as you leave!");