Question: 7 . Replace / / Your code here with your answer. Your code should ask the user to input three double numbers representing their monthly

7. Replace // Your code here with your answer.
Your code should ask the user to input three double numbers representing their monthly income, the amount they plan to save each month and their estimated monthly expenses and determine which of the following should be printed:
"You are within your budget." if the remaining amount is positive.
"You are exactly on your budget." if the remaining amount is zero.
"You are over your budget." if the remaining amount is negative.
Scanner input = new Scanner(System.in);
double monthlyIncome = input.nextDouble();
double monthlySavings = input.nextDouble();
double monthlyExpenses = input.nextDouble();
// Your code here

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!