Question: Question: Write the Java program for the given pseudocode. Using exactly 1 integer constant, 3 integer variables, and 1 Scanner variable make sure to fulfill

 Question: Write the Java program for the given pseudocode. Using exactly

Question: Write the Java program for the given pseudocode. Using exactly 1 integer constant, 3 integer variables, and 1 Scanner variable make sure to fulfill the following points: 1. Declare 1 constant integer called COST and set it to 25000 2. Declare 1 integer variable called airmiles. 3. Declare 1 integer variable called flights. 4. Declare 1 integer variable called balance. 5. Declare 1 Scanner variable that will record keyboard inputs. 6. Prompt the user through the console for an integer value for the number of air miles, and store the user's inputs in the variables airmiles and discount (use the same format and wording as the sample figure below). 7. Record the number of flights the user can redeem in the variable as the result of airmiles / COST. 8. Record the balance of the user's airmiles in the variable as the results of airmiles % COST. 9. Output in the console a blank line followed by the message You can redeem short haul flights. The balance of your air miles will be , and are the values stored in the corresponding variables. The boxes below illustrate how your program should behave and appear. Enter the balance of your air miles?-76876.) You can redeem. 3 short haul flights. The balance of your air.miles will be 1876. REMEMBER in the output: is a space and is a new line. Text in green is user input. Note 1: You are to expect a perfect user who will always enter a positive integer; that is, do not verify the validity of user input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!