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
sashaice [31]
3 years ago
11

Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the us

er 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:
Dominik [7]3 years ago
4 0

Answer:

import java.util.*;

public class Main {

public static void main(String[] args)

{

Scanner scan = new Scanner();

double budget=0, num=0, total=0;

System.out.println("Your budget for the month? ");

budget=scan.nextDouble();

System.out.println("enter all expense, and after that type -9999 to quit: ");

while(num != -9999)

{

total+=num;

num=scan.nextDouble();

}

if(total<=budget)

{

System.out.println("under budget by ");

System.out.println(budget-total);

}

else

{

System.out.println("over budget by ");

System.out.println(total-budget);

}

}

}

Explanation:

  • Take the budget as an input from user and store it to the budget variable.
  • Loop until user has entered all his expenses and keep on adding them to the total variable.
  • Check If the total is less than or equal to budget or otherwise, and then print the relevant message accordingly.
You might be interested in
Edible vaccines, a more controversial approach to vaccine development, have been investigated by scientists. Plants can be genet
madreJ [45]
I need some more information. If you need any more help with this please leave a relpy.
8 0
3 years ago
Help ASAP
Gelneren [198K]

Answer:

By supplying a variety of charts and graphs to present the information in best way.

By tracking and analyzing the data

By conveying large amount of numerical data in more understandable format.

Explanation:

You need to know the limitations of Excel software. You will find that it does not support more than 3 variables while analyzing. However, if you use analytic software like Tableau and Microsoft Power BI then you can use a lot number of variables. And this is done through graphs and charts, and the other variables apart from x, y, z are the colors, shades. etc. Even color alone can add a good number of variables, and hence you can understand. Thus, you will be able to query better. Queries become better if you have more variables. And charts and graphs always present the information in the best way/ Also you can track and analyze the data. And through it conveying a large amount of numerical data in a more understandable format is made possible, and this is definitely quite helpful. Hence, all of the options mentioned above are helpful. But they do not do complex calculations and complex queries in fact.

4 0
3 years ago
Read 2 more answers
Which asynchronous electronic community is also known as a forum?
Semmy [17]
What are the choices?
Message Boarding is the asynchronous electronic that is know as a forum.
3 0
3 years ago
Read 2 more answers
What does every formula in microsofte excel spreadsheet start with??
Sedbober [7]
Equal sign (=) 
hope so !!!

5 0
3 years ago
Read 2 more answers
Imagine that you are creating a website for a client. How will you interact with the client, gather requirements, and update the
Arisa [49]

Answer:

Be polite and open to ideas

Explanation:

Before going make a list of things you need to know for sure. You could also provide some samples. Make sure you take many notes on what they want! Speak with your client and ask them how and when they want to be updated on progress, some might want to know once a week others may want to receive a progress report every day. Communication is always key and will always help you provide good service.

Hopefully, this helps!

4 0
2 years ago
Read 2 more answers
Other questions:
  • Numeric data is stored in ___________ for direct processing.
    10·2 answers
  • What are the 4-bit patterns used to represent each of the characters in the string "1301"? Only represent the characters between
    14·1 answer
  • The color band that represents tolerance on a resistor is the?
    11·1 answer
  • Which software can managers use to discuss financial performance with the help of slides and charts?
    7·2 answers
  • What is meant by encapsulating semaphores? Bring out the need for it
    12·1 answer
  • Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
    6·1 answer
  • rray testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cred
    5·1 answer
  • Want to.learn about computers​
    9·1 answer
  • If I'm screen sharing and I plug in a HDMI, will it screen share what the HDMI is plugged into, and can you talk at the same tim
    11·1 answer
  • 1. Software that is designed to intentionally cause harm to a device, server, or network is A. outware B.loggerware C.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!