Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         int a = int.Parse(Console.ReadLine());
  8.         int b = int.Parse(Console.ReadLine());
  9.         int c = int.Parse(Console.ReadLine());
  10.        
  11.         if(a>0 && b > 0  && c > 0)
  12.         {
  13.         if(a + b > c && b+c >a && a+c>b)
  14.         {
  15.         int area = a + b + c;
  16.         double lice = Math.Sqrt(area / 2 * ((area/2) - a)*((area/2)-b)*((area/2)-c));
  17.         Console.WriteLine(lice);
  18.            
  19.         }
  20.             else {
  21.             Console.WriteLine("Nqma triAgAlNik");
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement