Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Trapezoid
- {
- class Program
- {
- static void Main(string[] args)
- {
- double b1 = double.Parse(Console.ReadLine());
- double b2 = double.Parse(Console.ReadLine());
- double h = double.Parse(Console.ReadLine());
- double result = (b1 + b2) * h / 2;
- Console.WriteLine($"{result:f2}");
- }
- }
- }
- ИЛИ ТАРИКАТСКАТА:)
- using System;
- namespace Trapezoid
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine($"{(double.Parse(Console.ReadLine()) + double.Parse(Console.ReadLine())) * double.Parse(Console.ReadLine()) / 2:f2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment