In the program given below, Math.Sqrt function is throwing an error that is
"Expression denotes a variable', where a
method group' was expected."
What seems to be problematic here?
using System;
class program{
static void Main(){
Console.WriteLine("Enter the sides(a,b,c) of a triangle :");
int a = Convert.ToInt16(Console.ReadLine());
int b = Convert.ToInt16(Console.ReadLine());
int c = Convert.ToInt16(Console.ReadLine());
double s = (a+b+c)/2;
double area = Math.Sqrt(s(s-a)(s-b)(s-c));
if (a==b&&b==c){
Console.WriteLine("This is an Equilateral trangle");
}
else if(a==b&&b!=c||a!=b&&b==c){
Console.WriteLine("This is an Isosceles trangle");
}
else{
Console.WriteLine("This is an Scalene trangle");
}
}
}here