Spocoman

02. Triangle Area

Nov 15th, 2021 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Triangle
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             double a = double.Parse(Console.ReadLine());
  11.             double h = double.Parse(Console.ReadLine());
  12.             double result = a * h / 2;
  13.             Console.WriteLine($"{result:f2}");
  14.          
  15.         }
  16.  
  17.     }
  18. }
Add Comment
Please, Sign In to add comment