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