Skip to content

This is a Java program that prompts the user to enter an amount of change, and then outputs the fewest number of coins needed to make that change.

Notifications You must be signed in to change notification settings

End-Us3r/Exact-Change

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Exact-Change

This is a Java program that prompts the user to enter an amount of change, and then outputs the fewest number of coins needed to make that change. The program uses a series of if and else-if statements to determine the number of each type of coin required. The program reads input from the user using a Scanner object. The values of different types of coins are represented using variables, and the program uses the modulo operator to calculate the remaining change after each type of coin is subtracted from the total. The program includes multiple nested else-if statements and switch statements, making it more complex than necessary.

About

This is a Java program that prompts the user to enter an amount of change, and then outputs the fewest number of coins needed to make that change.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages