Advertisement
Guest User

SoftUni_Homework_1_4

a guest
Aug 17th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Numeric;
  6.  
  7. namespace SoftUni_Homework_1_4
  8. {
  9. class Program
  10. {
  11. static double CalculateHypotenuse (double c1, double c2)
  12. {
  13. return Math.Sqrt(Math.Pow(c1, 2) + Math.Pow(c2, 2));
  14. }
  15.  
  16. static void Main(string[] args)
  17. {
  18. uint[,] Catheti_Pairs = new uint[,] { { 3, 4 }, { 10, 12 }, { 100, 250 } };
  19. for (int i = 0; i < Catheti_Pairs.GetLength(0); i++)
  20. {
  21. Console.WriteLine(CalculateHypotenuse(Catheti_Pairs[i, 0], Catheti_Pairs[i, 1]).ToString());
  22. }
  23. Console.ReadKey();
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement