Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'mathn'
- puts "random name"
- puts "random name"
- puts " "
- puts "The program calculates the hypotenuse."
- puts "Input a:"
- a = gets.to_i
- puts "Input b:"
- b = gets.to_i
- c = Math.sqrt(a*a+b*b)
- puts "hypotenuse c: " + c.to_s
- gets
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement