Geometry
I am stuck on this assignment where it asks me to make it so I enter the size of the geometric figure and it calculates the area of the figure. This is the code I used: string kind = Console.ReadLine(); if (kind="square") { double a = double.Parse(Console.ReadLine()); double squareS = a * a; Console.WriteLine(squareS); } if (kind = "rectangle") { double a = double.Parse(Console.ReadLine()); double b = double.Parse(Console.ReadLine()); double rectangleS = a * b; Console.WriteLine(rectangleS); } if (kind = "circle") { double r = double.Parse(Console.ReadLine()); double circleS = r * r*Math.PI; Console.WriteLine(circleS); } if (kind = "triangle") { double a = double.Parse(Console.ReadLine()); double h = double.Parse(Console.ReadLine()); double triangleS = a*h/2; Console.WriteLine(triangleS); } and its giving me this error which I cannot fix: Cannot implicitly convert type 'string' to 'bool'. Can anyone help please?