Advertisement
svetlozar_kirkov

Return Hypotenuse (Exercise)

Oct 7th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using System;
  2.  
  3. class ConsoleTests
  4. {
  5.     static void Main()
  6.     {
  7.         double first = double.Parse(Console.ReadLine());
  8.         double second = double.Parse(Console.ReadLine());
  9.         ReturnHypotenuse(first,second);
  10.     }
  11.  
  12.     static void ReturnHypotenuse(double a, double b)
  13.     {
  14.         Console.WriteLine(Math.Sqrt(a * a + b * b));
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement