Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static double Square(int a, int b, int c)
- {
- double p = (a + b + c) / 2;
- double s = Math.Sqrt(p * (p - a) * (p - b) * (p - c));
- return s;
- }
- static double Data()
- {
- WriteLine("Стороны треугольника");
- int a = int.Parse(ReadLine());
- int b = int.Parse(ReadLine());
- int c = int.Parse(ReadLine());
- double S = Square(a, b, c);
- return S;
- }
- static void Main(string[] args)
- {
- double S1 = Data();
- double S2 = Data();
- if (S1 > S2)
- WriteLine(S1);
- else
- WriteLine(S2);
- }
Add Comment
Please, Sign In to add comment