Advertisement
AlexJC

Untitled

Aug 27th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Triangle_Area
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double x1 = double.Parse(Console.ReadLine());
  14. double y1 = double.Parse(Console.ReadLine());
  15. double x2 = double.Parse(Console.ReadLine());
  16. double y2 = double.Parse(Console.ReadLine());
  17. double x3 = double.Parse(Console.ReadLine());
  18. double y3 = double.Parse(Console.ReadLine());
  19.  
  20. double a = Math.Abs(x2 - x3);
  21. double h = Math.Abs(y1 - y2);
  22.  
  23. Console.WriteLine(a * h / 2);
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement