Question: This is a JAVA program #1 - Write a program that prompts the user to input an integer between 0 and 35. If the number
This is a JAVA program
#1 - Write a program that prompts the user to input an integer between 0 and 35. If the number is less than or equal to 9, the program should output the number; otherwise, it should output A for 10, B for 11, C for 12, ....and Z for 35. (Hint: use the cast operator, (char)(), for numbers >=10 OR use a switch statement for all those cases >=10).\
#2 - A box of cookies can hold 24 cookies and a container can hold 75 boxes of cookies. Write a program that prompts the user to enter the total number of cookies, then outputs the number of boxes and the number of containers to ship the cookies. If there are not enough cookies to fill a box, the box can be discarded and the number of leftover cookies should be output. If the number of boxes will not fill a container, then the leftover boxes can be discarded and the number of leftover boxes should be output.
For example: You need 1800 cookies (75 boxes each filled with 24 cookies) to fill a container. The user enters 2500 cookies - example output might be:
You entered 2500 cookies.
1 container with 75 boxes of 24 cookies shipped
29 boxes of 24 cookies discarded
4 cookies discarded
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
