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]
4 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]4 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
Suppose a friend asks you for advice on RSS feeds. What would be a reason you would suggest using RSS feeds?
Yuliya22 [10]

Answer:

to vein info ffom all search engines

4 0
3 years ago
Please help me with this question<br>it on the picture​
erik [133]

Explanation:

2)computer is a general process machine ,commonly constitution for Digital circuits that accept input stores manipulated and generates output.

example of input:

monitor ,speaker,printer etc.

example of output:

keyboard,cpu,mouse etc.

3 0
3 years ago
In which utility is the file search option found in windows
OLEGan [10]

Press Windows logo key + X Key.

Click on Control Panel.

Double Click on Troubleshooting.

Click on View all option, on left hand side of the window.

Click on Search and indexing and follow the on screen instructions.

5 0
4 years ago
Which wildcard characters will return a single character when using the Find dialog box?
scoray [572]

Answer:

?

Explanation:

It is the "?" character. When we type in the ? in the regular expression, then it means that it will be replaced by a single character. And when we type *, then we mean there can be multiple, and any number of characters. And this is what is meant by these two wildcard characters. Hence, the correct option here is ?.

Example: ?op can be top, pop, etc, and we can see here that, ? is replaced by only one character each time.

7 0
3 years ago
Read 2 more answers
Kerning is the adjustment of space between ___ characters.
IrinaK [193]
Answer: printed

Explanation: The definition of kerning is; the spacing between letters or characters in a piece of text to be printed.

4 0
4 years ago
Other questions:
  • A. STOP: What is a technology habit you practice today that you now realize will not help you to be successful? Explain why it’s
    10·2 answers
  • Ayuda no encuentro el concepto de estas tres preguntas: ¿para qué sirve la administración en la ofimatica o informática? ¿Que so
    13·1 answer
  • Each​ _____ in a relational database table is a unique record of something that users want to track.
    14·1 answer
  • Define a Python function named file_listers with two parameters. The first parameter will be a string specifying the name of the
    7·1 answer
  • Which of the following about Java arrays is true?
    14·1 answer
  • Which tool should be used when a fastener, such as a lug nut, is extremely tight
    6·2 answers
  • You are using a crimper to attach an RJ-45 connector to a Cat 6 UTP cable. Your company requires that all cabling follow the TIA
    14·1 answer
  • write a pay-raise program that requests a person's first name, last name, and current annual salary, and then displays the perso
    6·1 answer
  • Create a high-level plan to perform a gap analysis for Fullsoft Inc
    7·1 answer
  • You have a server that has a 100basefx network interface card that you need to connect to a switch. the switch only has 100baset
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!