Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class TriangleArea
- {
- static void Main(string[] args)
- {
- double a = double.Parse(Console.ReadLine());
- double h = double.Parse(Console.ReadLine());
- double area = a * h / 2;
- Math.Round(area, 2);
- Console.WriteLine("Triangle area = {0:F2}", area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement