Advertisement
Kuncavia

TrapezoidArea

Sep 6th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System;
  2.  
  3. class TrapezoidArea
  4. {
  5.     static void Main()
  6.     {
  7.         var b1 = double.Parse(Console.ReadLine());
  8.         var b2 = double.Parse(Console.ReadLine());
  9.         var h = double.Parse(Console.ReadLine());
  10.         var area = (b1 + b2) * h / 2;
  11.         Console.WriteLine("Trapezoid Area =" + area);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement