braveheart1989

08.Triangle_Area

Mar 7th, 2016
54
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. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _08.Triangle_Area
  8. {
  9.     class Triangle_Area
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.            
  14.  
  15.             double a = double.Parse(Console.ReadLine());
  16.             double h = double.Parse(Console.ReadLine());
  17.             double area = Math.Round((a * h) / 2,2);
  18.             Console.WriteLine("Triangle area = {0}",area);
  19.  
  20.         }
  21.     }
  22. }
Add Comment
Please, Sign In to add comment