Mega Code Archive

 
Categories / Ruby / Statement
 

Another form you can use is with beginend

temp = 98.3 begin   print "Your temperature is " + temp.to_s + " Fahrenheit. "   puts "I think you're okay."   temp += 0.1 end while temp < 98.6 puts "Your temperature is " + temp.to_s + " Fahrenheit. Are you okay?"