Skip to content

amckeown79/tip_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

tip_calculator

Create a file named tip_calculator.rb. Enter the following code:

puts "How much is the bill?" bill = gets puts "The bill is $#{bill}"

The gets method is the opposite of the puts method. It gets input from the user rather than sending output to the user. Run this sample program. When prompted, enter a bill amount, press enter, and see what happens. Edit this program to gets the total bill from the user, calculate the total plus a 20% tip, and output that total to the screen.

==============

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages