Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace tESt
- {
- class Program
- {
- static void Main(string[] args)
- {
- var a = double.Parse(Console.ReadLine());
- var b = double.Parse(Console.ReadLine());
- var c = double.Parse(Console.ReadLine());
- if (a < (b + c) && b < (a + c) && c < (a + b))
- {
- if ((a == b && a != c) || (a == c && a != b) || (b == c && b != a))
- {
- Console.WriteLine($"Triangle with sides {a}, {b} and {c} is isosceles.");
- }
- else if (a == b && a == c)
- {
- Console.WriteLine($"Triangle with sides {a}, {b} and {c} is equilateral.");
- }
- else
- {
- Console.WriteLine($"Triangle with sides {a}, {b} and {c} is scalene.");
- }
- }
- else
- {
- Console.WriteLine($"There is no triangle with sides {a}, {b} and {c}. ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement