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
The company generates a lot of revenue and is rapidly growing. They're expecting to hire hundreds of new employees in the next y
uysha [10]

Answer:

The most appropriate way to deal with the situation presented above is to acquire more space at the current office site at additional rent beforehand.

Explanation:

The Scaling of a revenue-generating business is a crucial task in which a lot of pre-planning and thinking is required.

In order to scale the business in the next year, the planning of it is to be carried out at the moment and proper necessary arrangements are ensured. These steps could be one from:

  • Looking for bigger spaces for renting for a full shift of the operations
  • Looking for a site office for an additional office
  • Acquiring more space in the current office site.

This process would result in acquiring a bigger place beforehand but in order to mitigate the risk, try to keep the place in view by providing them a bare minimum advance for the additional units.

8 0
3 years ago
The following SQL statement contains which type of subquery? SELECT title FROM books WHERE EXISTS (SELECT isbn FROM orderitems W
Rudiy27

Answer:

(a) Correlated.

Explanation:

Correlated subquery :These sub queries reference columns from outer table or uses values from outer query.These sub queries are processed atleast once for every row processed.So because of this reason correlated sub queries can be slow.Since the query in the question also uses value from the outer query so it is a correlated query.

4 0
3 years ago
At a local marketing firm, Steve is the lead Web developer and is responsible for working with customers on their Web designs, d
attashe74 [19]

Answer:

All of the above.

Explanation:

Understanding that he must create a unique domain name for each client

Being able to work with HTML

Understanding of the World Wide Web and how hyperlinks work

All of these would be a critical skill Steve must have to be able to perform his job.

6 0
3 years ago
What data type stores images and audio visual clips???
nevsk [136]
Jpg is what I use for my audio and images
3 0
2 years ago
Clicking a _____ name opens a drop-down list of commands and options.
UkoKoshka [18]
Clicking a menu opens a drop-down list of commands and options. According to Merriam dictionary, menu is defined as a list of things that you can choose from ; especially computers or a list shown on a computer from which you make choices to control what the computer does.
6 0
2 years ago
Other questions:
  • A file that contains program code is called a ____________.
    13·1 answer
  • In presentation software, what is the way that text and pictures are arranged on a page called?
    10·1 answer
  • On the Attendance worksheet, in cell L5, enter an IF function to determine if the percentage in cell K5 is greater than or equal
    9·1 answer
  • Insert a row above the selected row (in between row 1 and row 2).
    15·2 answers
  • What movie would be greatly improved if it was made into a musical?
    6·1 answer
  • In this lab, you will create a programmer-defined class and then use it in a Java program. The program should create two Rectang
    14·1 answer
  • When adopting the use of social media in emergency management, it is important to have
    10·1 answer
  • Write a function namedmake_complex that stores its twoarguments (both of type double) in acomplex structure, then returns thestr
    12·1 answer
  • Assume that students in a course are required to produce a written report on an ICT-related
    14·1 answer
  • HELP ASAP
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!