practice-problems-1/comments/04-time-conversion.rb
# Write a method that will take in a number of minutes, and returns a
# string that formats the number into `hours:minutes`.
#
# Difficulty: easy.
Write a method that will take in a number of minutes, and returns a
string that formats the number into `hours:minutes`.

easy.
Write a method that will take in a number of minutes and returns a string that formats the number into ` hours : minutes ` . easy .
def time_conversion(minutes)
    hrs = (minutes/60)      
    mins = (minutes%60)     
    if mins < 10            
        mins = mins.to_s+"0"
    end
    return "#{hrs}:#{mins}"  
end
def time_conversion ( minutes ) hrs = ( minutes / 60 ) mins = ( minutes % 60 ) if mins < 10 mins = mins . to_s + "0" end return "#{hrs}:#{mins}" end
Write a method that will take in a number of minutes, and returns a
string that formats the number into `hours:minutes`.
Write a method that will take in a number of minutes and returns a string that formats the number into ` hours : minutes ` .
#60 minutes == 1 hr # gets remaining minutes  #ex: 150 - 60 = 90 - 60 = 30. Since 60 doesnt go into 30, that how many minutes you have left. #for fomatting reason so its "6:00" instead of "6:0" #String Interpolation and the require format.
minutes
<not_specific>