Advertisement
BojidarDosev

zad 2 triug

Nov 8th, 2021
1,204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp11
  4. {
  5.     class Program
  6.     {
  7.         static void Triugulnik(int a,int b, int c)
  8.         {
  9.          
  10.             if (a == b && b == c && c == a) Console.WriteLine( "0");
  11.             if (a == b || a == c || b == c) Console.WriteLine("-1");
  12.             if (a < b + c && b < a + c && c < a + b) Console.WriteLine("1");
  13.             else Console.WriteLine("2");
  14.         }
  15.         static void Main(string[] args)
  16.         {
  17.  
  18.             Triugulnik(4, 2, 5);
  19.            
  20.         }
  21.  
  22.        
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement