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