nvnnaidenov

TriangleArea - Chapter 2.0

Feb 9th, 2022
646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. //Task 008, Chapter 2.0
  2. using System;
  3.  
  4. public class TriangleArea
  5. {
  6.     static void Main()
  7.     {
  8.         double a = double.Parse(Console.ReadLine());
  9.         double h = double.Parse(Console.ReadLine());
  10.  
  11.         double area = a * h / 2;
  12.  
  13.         Console.WriteLine(Math.Round(area, 2));
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment