nvnnaidenov

TrapeziodArea - Chapter 2.0

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