Challenge: Counting Money

Given infinite quarters, dimes, nickels and pennies, calculate the minimum number of coins to represent a number V. Implement the solution in C++ and see if your code runs successfully!

Problem Statement:

Given an infinite number of quarters (25cents)(25 cents), dimes (10cents)(10 cents), nickels (5cents)(5 cents), and pennies (1cent)(1 cent), implement a function to calculate the number of COINS to represent VV cents.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.