Question: Instruction: 1. Use Notepad to create new text file named EX05_2.java. Enter the following two lines (be sure to replace YourFullName with your full name):

Instruction: 1. Use Notepad to create new text file named EX05_2.java. Enter the following two lines (be sure to replace YourFullName with your full name): // FileName: EX05_2.java // Programmer: Your FullName 2. Next to the above two lines, write a Java program that declares three variables of int type, q, d, and n, to represent a set of number of coins a user must insert in order to buy a pack of cookie from the vending machine. 3. Use three nested while loops (must be while loops) to display all possible combinations of q, d, and n, as shown below. You need to use an if statement within inner-most while loop to evaluate a Boolean condition based on the formula: 0.25q +0.1d + 0.05n = 0.65. Make sure the output looks similar to the following. 0,0,13 0,1,11 4. 159 Java Programming - Penniel P. Wu, PhD 0,2,9 0,4,5 0,5,3 1,0,8 1,1,6 1,2,4 1, 3,2 1,4,0 2,0,3 2,1,1 5. Capture screen shot(s) similar to the above figure(s) and paste it to the Word document named EX05.doc" (or .docx or .pdf)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
