Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.to_i
  11.  
  12. puts "Input b:"
  13. b = gets.to_i
  14. c = Math.sqrt(a*a+b*b)
  15.  
  16. puts "hypotenuse c: " + c.to_s
  17.  
  18. gets
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement