logo image

Ruby program to convert feet to inches

Following program shows you how to convert feet to inches. In this program we get feet from user, we get those we need to multiply with 12 so that we get in inches

 puts "Please enter feet:"
 feet = gets.to_f
 inches = feet * 12
 puts "#{inches} Inches"


Please enter feet:
180.0 Inches