wants to count the amount of change in his pocket to determine if he has enough money for buy TimBits for the next Computer Club meeting (every Thursday in room 221). Given the coins that he has, determine the total cent value of all of them.
Your program should define and implement the following methods:
getCents method that takes the following parameters:
intrepresenting the number of quarters has.
intrepresenting the number of dimes has.
intrepresenting the number of nickels has.
intrepresenting the number of pennies has.
The method should return an
int representing the cent value of all the coins taken as parameters.
There are 4 lines of input representing the number of quarters, dimes, nickels and pennies in that order. There will never be more than
1000 of any given coin.
Create and call the method outlined above in order to find the total cent value of the coins and print it.
2 1 5 6