This is a C program I attached the code I have so far but I

This is a C# program. I attached the code I have so far but I get a million errors when I debug it and I dont know how to fix it .. I dont know if its right in the slightest bit (Im extremely new to this language) but any help is greatly appreciated. Thank you soooo much!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project2AreaCalculator
{
    class Program
    {
        public double result, l, h, s, w, d1, d2, b, r, lb, sb;
        int option;

        static void Main(string[] args)
        {
            Program a = new Program();
       
            private static void CalculateCircle()
        {
            console.WriteLine(\"Please enter the radius of the circle\");
            radius = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Area of Circle is:{0}\", 3.14 * radius * radius);
        }
        private static void CalculateSquare()
        {
            Console.WriteLine(\"Enter the side of a square\");
            side = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Area of Square is:{0}\", side * side);
        }
        private static void CalculateRectangle()
        {
            Console.WriteLine(\"Enter the length of the rectangle\");
            l = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Enter the width of the rectangle\");
            w = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Area of rectangle is :{0}\", l * w);
        }
        private static void CalculateRhombus()
        {
            Console.WriteLine(\"Enter thelength of one diagonal of the rhombus\");
            d1 = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Enter thelength of other diagonal of the rhombus\");
            d2 = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Area of the Rhombus is : {0}\", (d1 * d2) / 2);
        }
        private static void CalculateParallelogram()
        {
            Console.WriteLine(\"Enter the length of the base of the parallelogram\");
            b = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Enter the height of the base of the parallelogram\");
            h = float.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Area of the Parallelogram is : {0}\", b * h);
        }
        private static void CalculateTrapezoid()
        {
            Console.WriteLine(\"Enter the length of the large base of the trapezoid\");
            lb = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Enter the length of the small base of the trapezoid\");
            sb = float.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Enter the height of the trapezoid\");
            h = double.Parse(Console.ReadLine());
            System.Threading.Thread.Sleep(2000);
            Console.WriteLine(\"Area of parallelogram is:{0}\", (lb + sb) * (h / 2));
        }

        Console.WriteLine(\"\ \ \");
            Console.WriteLine(\"Shape Area Calculator:\ \");
            Console.WriteLine(\"*****************************************************************\");
            Console.WriteLine(\"\ \ \");
            Console.WriteLine(\"Please select the number of the operation you would like to perform:\");
            Console.WriteLine(\"1. Circle\");
            Console.WriteLine(\"2. Square\");
            Console.WriteLine(\"3. Rectangle\");
            Console.WriteLine(\"4. Rhombus\");
            Console.WriteLine(\"5. Parallelogram\");
            Console.WriteLine(\"6. Trapezoid\");
            Console.WriteLine(\"7. Exit\");
            Console.WriteLine(\"\ \ \");
            Console.WriteLine(\"********************************************************************\");
            Console.WriteLine(\"Select a shape type to calculate : \");
            option = Convert.ToInt32(Console.ReadLine());
            switch (option)
            {
case 1:
            Console.WriteLine(\"1\");
            break;
        case 2:
            Console.WriteLine(\"2\");
            break;
        case 3:
            Console.WriteLine(\"3\");
            break;
        case 4:
            Console.WriteLine(\"4\");
            break;
        case 5:
            Console.WriteLine(\"5\");
            break;
        case 6:
             Console.WriteLine(\"6\");
                break;
        case 7:
                    Console.WriteLine(\"7\");
            break;
            console.ReadKey();
        }                    
        }
    }
}

You name your Console App Project Project02AreaCalculator This project will calculate the areas of one of six shapes. Those six shapes will be 1. Circle 2. Square 3. Rectangle 4. Rhombus 5. Parallelogram 6. Trapezoid You\'ll find the formulas at http://www. coolmath. com/referencelareas In this Project you\'re going to create a console application that will have a menu in the Main method asking the user to enter which shape they\'d like to find the area of include error checking so that if they make a menu selection that is not in the menu you will simply refresh the page until they make a correct menu selection. The last menu selection should be for quit and if they select this then clear the screen and say goodbye asking for a press any key to end. The menu should look like this: Shape Area Calculator 1. Circle Square 3. Rectangle Rhombus 5. Parallelogram Trapezoid 7. Exit Select a shape type to calculate: Once their selection is made you call a method for that shape and then prompt the user for input (according to the shape type) and then figure the area. The methods will be designated as type static, have a return type of void, and have no parameters

Solution

Here goes the working program.

*console is written instead of Console

*method definitions are moved out of the main method

*Variable declarations are made inside the method

*There was a problem with access specifiers as well. FIxed them.

Program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Rextester
{
class Program
{
//public double result, l, h, side, w, d1, d2, b, radius, lb, sb;
//int option;
public static void Main(string[] args)
{
Program a = new Program();

  
Console.WriteLine(\"\ \ \");
Console.WriteLine(\"Shape Area Calculator:\ \");
Console.WriteLine(\"*****************************************************************\");
Console.WriteLine(\"\ \ \");
Console.WriteLine(\"Please select the number of the operation you would like to perform:\");
Console.WriteLine(\"1. Circle\");
Console.WriteLine(\"2. Square\");
Console.WriteLine(\"3. Rectangle\");
Console.WriteLine(\"4. Rhombus\");
Console.WriteLine(\"5. Parallelogram\");
Console.WriteLine(\"6. Trapezoid\");
Console.WriteLine(\"7. Exit\");
Console.WriteLine(\"\ \ \");
Console.WriteLine(\"********************************************************************\");
Console.WriteLine(\"Select a shape type to calculate : \");
int option = Convert.ToInt32(Console.ReadLine());
switch (option)
{
case 1:
Console.WriteLine(\"1\");
CalculateCircle();
break;
case 2:
Console.WriteLine(\"2\");
CalculateSquare();
break;
case 3:
Console.WriteLine(\"3\");
CalculateRectangle();
break;
case 4:
Console.WriteLine(\"4\");
CalculateRhombus();
break;
case 5:
Console.WriteLine(\"5\");
CalculateParallelogram();
break;
case 6:
Console.WriteLine(\"6\");
CalculateTrapezoid();
break;
case 7:
Console.WriteLine(\"7\");
break;
Console.ReadKey();
}
}
private static void CalculateCircle()
{
Console.WriteLine(\"Please enter the radius of the circle\");
double radius = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Area of Circle is:{0}\", 3.14 * radius * radius);
}
private static void CalculateSquare()
{
Console.WriteLine(\"Enter the side of a square\");
double side = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Area of Square is:{0}\", side * side);
}
private static void CalculateRectangle()
{
Console.WriteLine(\"Enter the length of the rectangle\");
double l = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Enter the width of the rectangle\");
double w = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Area of rectangle is :{0}\", l * w);
}
private static void CalculateRhombus()
{
Console.WriteLine(\"Enter thelength of one diagonal of the rhombus\");
double d1 = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Enter thelength of other diagonal of the rhombus\");
double d2 = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Area of the Rhombus is : {0}\", (d1 * d2) / 2);
}
private static void CalculateParallelogram()
{
Console.WriteLine(\"Enter the length of the base of the parallelogram\");
double b = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Enter the height of the base of the parallelogram\");
double h = float.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Area of the Parallelogram is : {0}\", b * h);
}
private static void CalculateTrapezoid()
{
Console.WriteLine(\"Enter the length of the large base of the trapezoid\");
double lb = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Enter the length of the small base of the trapezoid\");
double sb = float.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Enter the height of the trapezoid\");
double h = double.Parse(Console.ReadLine());
System.Threading.Thread.Sleep(2000);
Console.WriteLine(\"Area of parallelogram is:{0}\", (lb + sb) * (h / 2));
}
}
}

This is a C# program. I attached the code I have so far but I get a million errors when I debug it and I dont know how to fix it .. I dont know if its right in
This is a C# program. I attached the code I have so far but I get a million errors when I debug it and I dont know how to fix it .. I dont know if its right in
This is a C# program. I attached the code I have so far but I get a million errors when I debug it and I dont know how to fix it .. I dont know if its right in
This is a C# program. I attached the code I have so far but I get a million errors when I debug it and I dont know how to fix it .. I dont know if its right in
This is a C# program. I attached the code I have so far but I get a million errors when I debug it and I dont know how to fix it .. I dont know if its right in

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site