Advertisement
YavorGrancharov

Triangle_Area_(Methods)

Jun 12th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         double width = double.Parse(Console.ReadLine());
  8.         double height = double.Parse(Console.ReadLine());
  9.         double area = Area(width, height);
  10.         Console.WriteLine(area);
  11.     }
  12.    
  13.     static double Area(double width, double height) {
  14.         return (width * height) / 2;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement