Submit solution
Points:
3
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java
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.
Methods
Your program should define and implement the following methods:
A getCents
method that takes the following parameters:
- An
int
representing the number of quarters has. - An
int
representing the number of dimes has. - An
int
representing the number of nickels has. - An
int
representing the number of pennies has.
The method should return an int
representing the cent value of all the coins taken as parameters.
Input Specification
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.
Output Specification
Create and call the method outlined above in order to find the total cent value of the coins and print it.
Sample Input
2
1
5
6
Sample Output
91
Comments
i love phutasin Dara, he is such as Baddie,
I love cs .🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵
Keep the change 😎😎
Problem is wrong, pennies are worth zero.🥵