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
Marysya12 [62]
3 years ago
6

Write an application that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer val

ues that represent the number of quarters, dimes, nickels, and pennies. Use a currency formatter to print the output.
Computers and Technology
2 answers:
Svetradugi [14.3K]3 years ago
8 0

Answer:

5

2

and 5

Explanation:

just do it youll see

pantera1 [17]3 years ago
4 0

Answer: Result:Enter the number of quarters in the jar: 4

Enter the number of dimes in the jar: 5

Enter the number of nickels in the jar: 2

Enter the number of pennies in the jar: 5

Total value is 1 dollars and 65 cents

Explanation: import java.util.Scanner;public class Coins { public static void main(String[]args) { int quarters, dimes, nickels, pennies; int total;Scanner scan = new Scanner (System.in);System.out.print("Enter the number of quarters in the jar: "); quarters = scan.nextInt();System.out.print("Enter the number of dimes in the jar: ");dimes = scan.nextInt(); System.out.print("Enter the number of nickels in the jar: ");nickels= scan.nextInt(); System.out.print("Enter the number of pennies in the jar: ");pennies = scan.nextInt(); int total_cents = 25*quarters + dimes*10 + nickels*5 + pennies;total =total_cents/100;total_cents = total_cents %100;System.out.println("Total value is " + total + " dollars and " + total_cents + " cents ");}}

Result:Enter the number of quarters in the jar: 4

Enter the number of dimes in the jar: 5

Enter the number of nickels in the jar: 2

Enter the number of pennies in the jar: 5

Total value is 1 dollars and 65 cents

You might be interested in
Jement Tools
Yuki888 [10]

Explanation:

I think it's either c or d but I don't remember

7 0
2 years ago
A______ is a electronic page in a presentation
Strike441 [17]
I'm going to guess slide, like Google slides
8 0
3 years ago
Detail how you would go about adding reserved words into the problem where you are designing your own lexical analyzer? How woul
iVinArrow [24]

A compiler's initial phase is lexical analysis. It reads changed source code written in the form of phrases from language preprocessors. By deleting any whitespace or comments in the source code, the lexical analyzer converts these syntaxes into a set of tokens. See how reserved words are added below.

<h3>How are reserved words added on the lexical analyzer?</h3>

When the lexical analyzer reads the target program code, it examines it letter by letter, and when it encounters a whitespace, operator symbol, or special symbol, it determines that a word has been finished.

Using the float floatvalue as an example, while scanning both lexemes until it reaches 'float,' the lexical analyzer is unable to determine whether it is a reserved word float or the details of a keyword float value.

According to the Longest Match Rule, the lexeme scanned should be decided by the longest match among all possible keywords.

The lexical analyzer also uses rule priority, which means that a reserved term, such as a keyword, of a language takes precedence over human input.

That is, if the lexical analyzer detects a lexeme that resembles any existing reserved term, an error should be generated.

Learn more about the lexical analyzer at;
brainly.com/question/13211785
#SPJ1

3 0
1 year ago
Which best describes the benefits of renting a home?
Slav-nsk [51]
<span>The benefits of renting a home are many. Renting can be less expensive, for example, your rent might even cover utilities. If a person moves frequently or may not be planning on staying in the area, renting is beneficial because they can just leave when the lease is up instead of having to sell a home. Frequently, the owner of the property is responsible for many repairs - such as plumbing and electric work. There is also less care involved when renting apartments or condos because the management will take care of things like the landscaping and repairing driveways.</span>
7 0
3 years ago
Select all that apply. When you cut text from a document, you may: leave it in the clipboard paste in into another document past
Leni [432]

Answer:

copy it into another location

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • "re-type the celsius_to_kelvin function. Change the name to kelvin_to_celsius, and modify the function accordingly."
    7·2 answers
  • What is the 7 X 7 when referring to PowerPoint presentations?
    12·2 answers
  • What makes a distributed denial of service attack "distributed"? It involves many ip addresses. It attacks multiple systems. It
    9·1 answer
  • 1.Which of the following class definitions defines a legal abstract class?a. class A { abstract void unfinished() { } }b. class
    7·1 answer
  • The problem with the media giving equal air time to those who are __________ about the effects of media violence on violent beha
    9·1 answer
  • You are in the middle of a big project at work. all of your work files are on a server at the office. you want to be able to acc
    14·1 answer
  • What is the answer 11100+01010​
    8·1 answer
  • Generally speaking, what is a “best practice"?
    13·1 answer
  • ________ can be written only once. The data cannot be erased or written over once it is saved.​
    9·1 answer
  • Choose the term to complete the sentence.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!