1998 HIGH SCHOOL PROGRAMMING CONTEST

 

Practice Problem  – A Bit More Complex than “Hello World”

Description:

Bob has some change in his pocket and a $2000 computer on his desk.  He wants to use his computer to its fullest capacity.  He wants the computer to calculate how much change he has.  Bob will input the number of pennies, nickels, dimes and quarters in his pocket.  The computer will then print out the total amount of money he has.

 

The output dollar amount must be printed with two decimal places.

Example:

(boldface indicates user input)

 

Hi Bob.

How many pennies do you have? 1

How many nickels do you have? 5

How many dimes do you have? 0

How many quarters do you have? 3

 

Bob, you have $1.01.