Advertisement
coasterka

#3TrapezoidArea

Mar 13th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. static void Main()
  2.         {
  3.             Console.WriteLine("Enter trapezoid's base A: ");
  4.             float baseA = float.Parse(Console.ReadLine());
  5.             Console.WriteLine("Enter trapezoid's base B: ");
  6.             float baseB = float.Parse(Console.ReadLine());
  7.             Console.WriteLine("Enter trapezoid's height H: ");
  8.             float height = float.Parse(Console.ReadLine());
  9.             float area = ((baseA + baseB) * height) / 2;
  10.             Console.WriteLine("Trapezoid's area is: {0}", area);
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement