Vladimir76

задача 5

Dec 27th, 2013
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. Console.Write(" Entering a basis A (sm): ");
  2. double osnovaA = double.Parse(Console.ReadLine());
  3. osnovaA = Math.Abs(osnovaA);
  4. Console.WriteLine();
  5.  
  6. Console.Write(" Entering a basis B (sm): ");
  7. double osnovaB = double.Parse(Console.ReadLine());
  8. osnovaB = Math.Abs(osnovaB);
  9. Console.WriteLine();
  10.  
  11. Console.Write("Entering a height H (sm): ");
  12. double heightH = double.Parse(Console.ReadLine());
  13. heightH = Math.Abs(heightH);
  14. Console.WriteLine();
  15.  
  16. double areaTrapeze = (osnovaA + osnovaB)*heightH/2;
  17. Console.WriteLine(" area : " + areaTrapeze + " sm^2");
Advertisement
Add Comment
Please, Sign In to add comment