1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
goldfiish [28.3K]
2 years ago
14

16. Budget Analysis Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop shoul

d then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
Computers and Technology
1 answer:
strojnjashka [21]2 years ago
6 0

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter month's budget");

       double monthBudget = in.nextDouble();

       double totalExpenses = 0.0;

       double n;

       do{

           System.out.println("Enter expenses Enter zero to stop");

           n = in.nextDouble();

           totalExpenses += n;

       }while(n>0);

       System.out.println("Total expenses is "+totalExpenses);

System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));

   }

}

Explanation:

  • Using Java programming language
  • Prompt user for month's budget
  • Use Scanner class to receive and store the amount entered in a variable
  • Use a do while loop to continuously request user to enter amount of expenses
  • Use a variable totalExpenses to add up all the expenses inside the do while loop
  • Terminate the loop when user enters 0 as amount.
  • Subtract totalExpenses from monthBudget and display the difference as the amount over the budget

You might be interested in
They have outlined their technical needs and have sent some of the documentation along with the potential provider's SLAs and te
iren2701 [21]

Answer:

A concern that might be expressed by the legal department after reviewing the SLAs and terms of service is:

c. Ensuring that there is a guarantee that the cloud service provider will provide notice in the event that they decide to discontinue operations.

Explanation:

The SLA that the legal department will review should include a description of the services to be provided, expected service levels, measurement metrics for each service, each party's duties and responsibilities, and the contract remedies or penalties for breach, among others.  But the legal department will be mostly concerned with legal remedies during breaches, liability limitation and warranties, and intellectual property protection issues than with more technical issues.  This is despite the fact that all the terms of the SLA will be diligently reviewed by the legal department.

7 0
3 years ago
Which two keys are commonly used to move or insert data?.
vlabodo [156]

Answer:

control and shift

Explanation:

6 0
2 years ago
What happens when variables in programming are not properly initialized? answers?
Romashka-Z-Leto [24]
Errors in compilation happen, or it runs but then doesn't recognize the input. Also you can't transform into other types of variables.
6 0
3 years ago
During which step of the problem-solving process would group members combine and elaborate on ideas? Define the problem. Analyze
slava [35]

In a problem-solving process occurring inside a group, (C) develop creative solutions would be where the members combine and elaborate on ideas.

Brainstorming would be a prominent feature during this process since group members would be encouraged to state her or his opinion and solutions about the problem that the group needs to solve.

5 0
3 years ago
Which Additional Authorization List item can replace the hook at the end of the winch cable for fastening the cable to some load
satela [25.4K]

Answer:

Shackle

Explanation:

A winch may be defined as a mechanical device which is used to pull in or let out the rope or cable maintaining its tension. It can also adjust the tension of the cable or the rope.

It is mainly used in tow trucks, elevators and steam shovels.

Shackle is one of the additional authorization list of a vehicle with a winch which can be used to replace the hook of the cable of the winch.

8 0
3 years ago
Other questions:
  • Write a function, factors, that takes an integer n, and returns a list of values that are the positive divisors of n. Note: 0 is
    13·1 answer
  • What does raster graphic mean
    5·1 answer
  • Using features on demand results in saving potentially significant amounts of disk space. features on demand becomes a third ins
    14·1 answer
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • _________ are represented using diamonds linked withparticipant ETs
    6·1 answer
  • Are storage devices input devices
    8·1 answer
  • Categorize each of the following situations as a compile-time error, run-time error, or logical error. Group of answer choices m
    5·1 answer
  • If we assume the modern view of existential import, why is the following syllogism invalid? No computer is made of clay. All com
    15·1 answer
  • Who invented the Bluetooth device​
    12·1 answer
  • 8.4 Lesson Practice <br> edhesive quiz
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!