X321: minPrice

Given three double values representing prices, return the smallest price. For example, if the values passed in are 19.95, 12.85, and 24.88, the returned value should be 12.85.

Examples:

minPrice(30, 5) -> true
minPrice(19.95, 12.85, 24.88) -> 12.85
minPrice(4.25, 9.99, 12.72) -> 4.25
minPrice(9.99, 7.77, 7.77) -> 7.77

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.