using System;
namespace DataBytes___Lab
{
class Program
{
static void Main(string[] args)
{
int a = int.Parse(Console.ReadLine());
int b = int.Parse(Console.ReadLine());
int c = int.Parse(Console.ReadLine());
Boolean isValid = true;
if ((a + b > c) && (b + c > a) && (a + c > b))
{
Console.WriteLine("Triangle is valid.");
}
else
{
Console.WriteLine("Invalid Triangle.");
return;
}
if ((a * a + b * b == c * c))
{
Console.WriteLine("Triangle has a right angle between sides a and b");
}
else if (b * b + c * c == a * a)
{
Console.WriteLine("Triangle has a right angle between sides b and c");
}
else if (a * a + c * c == b * b)
{
Console.WriteLine("Triangle has a right angle between sides a and c");
}
else if ((a + b > c) && (a + c > b) && (b + c > a))
{
Console.WriteLine("Triangle has no right angles");
}
}
}
}
Comments