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]
2 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]2 years ago
8 0

Answer:

5

2

and 5

Explanation:

just do it youll see

pantera1 [17]2 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
The partners of a small architectural firm are constantly busy with evolving client requirements. To meet the needs of their cli
maks197457 [2]

Answer:

Check the explanation

Explanation:

IPSec-based VPN is configured in two different modes namely

IPSec Tunnel mode and IPSec Transport mode so here we are using IPsec transport mode which is used for end to end communications between a client and a server in this original IP header is remain intact except the IP protocol field is changed and the original protocol field value is saved in the IPSec trailer to be restored when the packet is decrypted on the other side due to this arrangement you need to use application based firewall because there are certain specific rules that can address the particular field (explained above-change in IP protocol field) which at the other end need to be same so at the type of decryption, original IP protocol field can be matched.

4 0
3 years ago
There are many careers within the IT industry. _____ are responsible for organizing a company's data, making sure all the data i
devlian [24]
C. database administrators are responsible for organizing a company's data making sure all the data is accurate' available' and secure
5 0
2 years ago
Which of the following documents cannot be created using the Microsoft® Word® application?
denis23 [38]
The correct answer is C. Customer spreadsheet
7 0
3 years ago
Read 2 more answers
In the simulation, player 2 will always play according to the same strategy. The number of coins player 2 spends is based on wha
baherus [9]

The simulation, player 2 will always play according to the same strategy.

Method getPlayer2Move below is completed by assigning the correct value to result to be returned.

Explanation:

  • You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on.

#include <bits/stdc++.h>  

using namespace std;

bool getplayer2move(int x, int y, int n)  

{

   int dp[n + 1];  

   dp[0] = false;  

   dp[1] = true;  

   for (int i = 2; i <= n; i++) {  

       if (i - 1 >= 0 and !dp[i - 1])  

           dp[i] = true;  

       else if (i - x >= 0 and !dp[i - x])  

           dp[i] = true;  

       else if (i - y >= 0 and !dp[i - y])  

           dp[i] = true;  

       else

           dp[i] = false;  

   }  

   return dp[n];  

}  

int main()  

{  

   int x = 3, y = 4, n = 5;  

   if (findWinner(x, y, n))  

       cout << 'A';  

   else

       cout << 'B';  

   return 0;  

}

8 0
3 years ago
Why header files are needed in every c program ?expalin​
bonufazy [111]

Answer:

Header files serve two purposes. System header files declare the interfaces to parts of the operating system. You include them in your program to supply the definitions and declarations you need to invoke system calls and libraries.

6 0
2 years ago
Other questions:
  • You can use Facebook's live feed tool to broadcast content as you post it
    8·2 answers
  • 1) If a client requests timestamping every two minutes, how would it look? a) [00:02:00] b) [00:06:00] c) (00:04:00)
    15·2 answers
  • What technique creates different hashes for the same password? ccna routing protocols final answers?
    7·1 answer
  • Describe what is meant by the following:
    14·1 answer
  • Forensic computer investigators must _____.
    6·2 answers
  • If a user receives a message whose tone and terminology seems intended to invoke a panic or sense of urgency, it may be a(n) ___
    13·1 answer
  • When should students practice netiquette in an online course?
    9·1 answer
  • What is single user operating system? Write two examples.​
    12·2 answers
  • Select the correct answer.
    8·2 answers
  • The internet is controlled by ______
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!