Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. require 'mathn'
  2.  
  3. puts "random name"
  4. puts "random name"
  5. puts " "
  6.  
  7. puts "The program calculates the hypotenuse."
  8.  
  9. puts "Input a:"
  10. a = gets
  11.  
  12. puts "Input b:"
  13. b = gets
  14. c = Math.sqrt(a*a+b*b)
  15.  
  16. puts "hypotenuse c: " + c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement