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 _03.Triangle
- {
- 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 < (a + b) && b < (a + c) && c < (a + b))
- {
- if (a != b && b != c && c != a)
- {
- Console.WriteLine("Triangle with sides {0}, {1} and {2} is scalene.", a.ToString("0.###"), b.ToString("0.###"), c.ToString("0.###"));
- }
- else if (a == b && b != c)
- {
- Console.WriteLine("Triangle with sides {0}, {1} and {2} is isosceles.", a.ToString("0.###"), b.ToString("0.###"), c.ToString("0.###"));
- }
- else if (a == b && b == c)
- {
- Console.WriteLine("Triangle with sides {0}, {1} and {2} is equilateral.", a.ToString("0.###"), b.ToString("0.###"), c.ToString("0.###"));
- }
- }
- else
- {
- Console.WriteLine("There is no triangle with sides {0}, {1} and {2}.", a.ToString("0.###"), b.ToString("0.###"), c.ToString("0.###"));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement