In addition to what Dave and Patrice have said - C# is case sensitive - the Main method in a Console app must be
public
, as must the class that contains it.
Try:
using System;
namespace ConsoleApp2
{
public class Program
{
public static void Main(string[] args)
{
double a, b, X;
Console.WriteLine("Enter the value for a: ");
a = double.Parse(Console.ReadLine());
Console.WriteLine("Enter the value for b: ");
b = double.Parse(Console.ReadLine());
Console.WriteLine("Enter the value for BETA: ");
int beta = int.Parse(Console.ReadLine());
double betaRad = beta * (Math.PI / 180);
double num = (3 * a) + b;
double denom = Math.Sqrt(a * a * Math.Pow(Math.Sin(betaRad), 2)) - (b * b * Math.Cos(betaRad));
X = num / denom;
Console.WriteLine(Math.Round(X,2));
}
}
}
But please, dump the comments. They are useless because they tell us what the code is doing, not why it's doing it. If your comment doesn't add to understanding, it's not worth keeping - in fact it's misleading, as it's unlikely to modified when the code is.
About the only partially useful comment in there is this one:
double betaRad = beta * (Math.PI / 180);
And that could be replaced by improving the variable name:
double radiansBeta = beta * (Math.PI / 180);