4.24 LAB: Exact change
Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.

Ex: If the input is:

0
or less than 0, the output is:

No change
Ex: If the input is:

45
the output is:

1 Quarter
2 Dimes

Answers

Answer 1

The Exact change program is an illustration of conditional statements;

Conditional statements are used to make decisions

The Exact change program

The Exact change program written in java programming language, where comments explain each action purposes

import java.util.*;

public class Money{

public static void main(String [] args){

Scanner input = new Scanner(System.in);

// Declare Variables

int amount, dollar, quarter, dime, nickel, penny;

// Prompt user for input

System.out.print("Amount: ");

amount = input.nextInt();

// Check if input is less than 1

if(amount<=0)  {

  System.out.print("No Change");  }

else  {

  // Convert amount to various coins

  dollar = amount/100;   amount = amount%100;

  quarter = amount/25;   amount = amount%25;

  dime = amount/10;   amount = amount%10;

  nickel = amount/5;   penny = amount%5;

  // Print results

  if(dollar>=1)    {

    if(dollar == 1) { System.out.print(dollar+" dollar\n");}

  else { System.out.print(dollar+" dollars\n"); }

}

if(quarter>=1){

if(quarter== 1){System.out.print(quarter+" quarter\n");}

else{System.out.print(quarter+" quarters\n");}

}

if(dime>=1){

if(dime == 1){System.out.print(dime+" dime\n");}

else{System.out.print(dime+" dimes\n");} }

if(nickel>=1){

if(nickel == 1){System.out.print(nickel+" nickel\n");}

else{System.out.print(nickel+" nickels\n");}}

if(penny>=1){

if(penny == 1) {System.out.print(penny+" penny\n");}

else { System.out.print(penny+" pennies\n"); }}}}}

Read more about conditional statements at:

https://brainly.com/question/11073037

#SPJ1


Related Questions

The TCP\IP protocol was invented by who

Answers

Answer:

The TCP protocol was invented by Bob Kahn, Ray Tomlinson and Vint Cerf.

Explanation:

Answer:

Vint Cerf ,Bob Kahn and Ray Tomlinson

You are advising the owner of Smalltown Computer, a new, local computer repair store that also builds custom computers to order. What competitive strategies could Smalltown Computer exert? Which ones will it have difficulty exercising?

Answers

Answer:

speech processing is the study of speech signals and processing access signal the signals are used process in a digital representation suspicious processing can be recognised as a special case of digital signal processing light to speed signal

4. The volume of a sphere is (4.0/3.0)rr3 and the surface area is 4.0rr2, where r is the radius of
the sphere. Given the radius, design an algorithm that computes the volume and surface area of
the sphere. (You may assume that T-3.141592) (Exercise#17)

Answers

An algorithm that computes the volume and surface area of this sphere include:

Get the radius.Calculate the volume.Calculate the surface area.

What is an algorithm?

An algorithm is a standard formula which comprises a set of finite steps and instructions that must be executed in order to proffer solutions to a problem on a computer, under appropriate conditions.

For this exercise, an algorithm that computes the volume and surface area of this sphere is as follows:

Get the radius.Calculate the volume.Calculate the surface area.

Read more on algorithm here: brainly.com/question/24793921

$SPJ1

What is the result of the expression: int('1750.0')?

Answers

Answer:

Value error

Explanation:

The result of the expression: int ('1750.0') is an error: the string does not represent an integer value. The correct option is a.

What is an expression?

A "statement," which is just a single unit of execution and returns nothing, is different from an "expression," which is a mixture of values and functions that are combined and processed by the compiler to create a new value.

A mix of operators, constants, and variables makes up an expression. To produce a value, an expression can include one or more operands and one or more operators.  A programming error is a mistake in the way a program functions. Although the software can execute, it does not perform as planned.

Therefore, the correct option is a. An error: the string does not represent an integer value.

To learn more about expressions, refer to the link:

https://brainly.com/question/14122593

#SPJ2

The question is incomplete. Your most probably complete question is given below:

a. An error: the string does not represent an integer value

b. The value 1750 as an int

c. The value 1750.0 as a float

d. The value '1750'as a string

what will happen if I upgrade my asus crosshair v formula-z motherboard to a asus rog strix b450-f motherboard?

Answers

Answer: A lot will happen

Explanation:

If you will upgrade your laptop, that means it will get better in performance and a lot of other things....

Also, if the laptop has the word formula, you know that's a good thing, especially if it's z, which is the last letter in the alphabet.

And the other letters are something that I don't understand especially the Strix b450-f part..

Hope I helped a lotttt...

The term ____ photography syndrome is often used to refer to photographers who who use zoom lenses all the time rather than prime lenses.

Answers

Answer:

The term Gear Acquisition photography syndrome is often used to refer to photographers who who use zoom lenses all the time rather than prime lenses.

Explanation:

You are a Junior IT Technician in your organisation. One of the duties is to demonstrate and explain how the computer works to new intern stuff. Discuss how you would demonstrate and explain?

Answers

As an Junior IT technician in your company. One of the responsibilities is to set up and Install computer structures for the new intern staff members in order to display and explain how the computer functions to them.

How will you address one or more technical areas?

Depending on the dimensions of the employer you account for, the answer varies. It's not uncommon for a technical IT support team to be split into first- and second-line support, with the second-line support team taking care of the more specialist inquiries that the first-line support team couldn't handle.

I'll explain how to set up and configure computer systems, identify hardware and software issues, and resolve technical and awareness issues, either over the phone or in person, in my capacity as an IT technician.

Learn more about organisations here:

https://brainly.com/question/26965722

#SPJ10

what keys would you use when selecting multiple files not listed together

Answers

To select multiple files that are not listed together is first arrange them in order by date or their names, so that they get listed together, then press CTRL A to select all and copy them into a separate file.

What is selecting multiple files?

Selecting multiple files is choosing many files together at once. Many times we select multiple files at once, that save our time.

Thus, to select multiple files that are not listed together is first arrange them in order by date or their names, so that they get listed together, then press CTRL A to select all and copy them into a separate file.

Learn more about selecting files in computer

https://brainly.com/question/10894626

#SPJ1

A date for creation or revision
is mandatory for all web pages?

Answers

Answer:

I do believe so

Explanation:

Most websites have this, as far as I know

I want a loyal girlfri,end​

Answers

Answer:

go to dating app

Explanation:


2. Which one of the following is the purpose of relating tables in a database?
A. To permit external data only to be viewed.
B. To allow data to be sorted before printing to a report.
C. To enable mathematical calculations to be carried out more efficiently.
D. To avoid duplication of data.

Answers

Answer:

D. To avoid duplication of data.

ConstructalogicnetworkthatrealizesthethreeinputORfunction(A+B+C) using only two input NAND gates (AB)’. Prove that your design works correctly by annotating the output of each NAND gate with its Boolean equation.

Answers

Answer:

I think that the grade my teacher gave me on my test is wrong

To stay safe and avoid malware programs you should (choose 3)
a. run updates to your computers operating system
b. turn off your computer
c. install antivirus software and run regular updates and scans
d. click on any antivirus software ads that you see on the internet
d. avoid suspicious-looking ads or downloads when on the internet
f. install every virus software

Answers

Answer:

I would say choose,

A -  run updates to your computers operating system

C - install antivirus software and run regular updates and scans

D - avoid suspicious-looking ads or downloads when on the internet

Which of the following best describes a hotspot as
used in the Action feature of PowerPoint?

an image containing visible hyperlinks
O an invisible hyperlink embedded in a slide
O
a feature that converts presentations to
documents
a feature that allows you to present a slide to
people located remotely

Answers

A statement which best describes a hotspot as used in the Action feature of PowerPoint is: B. an invisible hyperlink embedded in a slide.

What is a hotspot?

A hotspot can be defined as a visual effect that can be applied in Microsoft PowerPoint to content on a slide, so as to make elements (objects) interactive with the end users.

This ultimately implies that, an invisible hyperlink embedded in a slide is a statement which best describes a hotspot as used in the Action feature of PowerPoint.

Read more on PowerPoint here: https://brainly.com/question/26404012

#SPJ1

Answer:

It's B

Explanation:

i got it right on edg 2023

What is the process of ensuring that corporate security policies are carried out
consistently?

Answers

Policy or security and only conscious

Ensuring consistent adherence to corporate security policies involves a systematic approach to implementation and monitoring.

Ask about the process of ensuring that corporate security policies are carried out consistently.

Here are some steps that can be taken to ensure policies are carried out consistently:

1. Policy Development:

Establish clear and comprehensive security policies that cover various aspects such as data protection, access controls, network security, and employee guidelines.

2. Communication and Training:

Effectively communicate the policies to all employees, ensuring they understand their roles and responsibilities in maintaining security.

3. Documentation and Accessibility:

Document the policies in an easily accessible format, such as an employee handbook or an intranet portal. Regularly update and maintain the documentation to reflect any changes or new requirements.

4. Compliance Monitoring:

Implement a monitoring system to track compliance with security policies. This can include conducting internal audits, vulnerability assessments, and security awareness campaigns.

5. Incident Response and Reporting:

Establish a clear process for reporting security incidents or violations. Encourage employees to report any suspicious activity promptly.

To learn more about the security policies visit:

https://brainly.com/question/13169523

#SPJ3

I have a .NET 6 basic website that I built using Entity Framework as the database for updating pages. I am ready to deploy the site/database to a live server somewhere, but I am looking for the best option.

The website is built using the latest .NET Framework 6.0, with Entity Framework 6.0.3. I know about HostGator, GoDaddy and InterServer.

I have read stuff online that said HostGator doesn't actually support the latest .NET 6.0, and GoDaddy only supports .NET Core 3.2?

HostGator is rougly $5.00 a month, GoDaddy is $6.00, and InterServer is $8.00.

I am leaning towards InterServer, because I have read that InterServer supports the latest .NET 6.0 and Entity Framework.

I am used to deploying to servers using LAMP stack, Linux, Apache, PHP, MySQL... The prices there are lower and it is fairly simple to setup. I figure there has to be something similar for windows and .NET.

For something similar, am I looking for Shared Hosting? Or VPS? I really don't understand what I need. I was hoping for Shared Hosting, export my SQL Server database, create it on the live server, then FTP my files over.

InterServer seems like it supports everything, so I am leaning towards that. I know no matter what, Windows Hosting is going to be a little bit more expensive. I just want something that I know is going to work with the latest .NET technologies.

Does anyone have any suggestions?

Answers

In the above scenario, i will recommend Bluehost  or InterServer since it is good and can meet your requirement.

What is Bluehost?

Bluehost is known to be a software that is said to be a little bit better than HostGator in the aspect of  security as it gives offer free SSL certificates, malware tools, and others.

Therefore, In the above scenario, I will recommend Bluehost  or InterServer since it is good and can meet your requirement.

Learn more about Bluehost from

https://brainly.com/question/17062016

#SPJ1

Trent is researching what it would take to become a pharmaceutical scientist. What academic requirements should he complete?
A.
an associate’s degree
B.
on-the-job training
C.
technical school
D.
a doctorate degree
E.
a bachelor’s de

Answers

Answer:

D - a doctorate degree

Explanation:

You are studying in a role as a doctors position.

The second generation of computer languages is a higher-level language than
machine language but is also machine dependent. It uses a series of short codes,
or mnemonics, to represent data or instructions.

Answers

Assembly language is the second generation of computer languages is a higher-level language than machine language but is also machine dependent. It uses a series of short codes, or mnemonics, to represent data or instructions.

What is assembly language?

Any low-level programming language having a very close resemblance between its instructions and the machine code instructions of the architecture is known as assembly language, assembler language, or symbolic machine code in the field of computer programming. One statement per machine instruction (1:1) is the norm for assembly language, however constants, comments, assembler directives, symbolic labels for things like memory locations, registers, and macros are typically also available.

Learn more about assembly language here https://brainly.com/question/13171889

#SPJ10

Many physical features of CPUs have been upgraded over the years. Below are some the features that latest CPUs can perform. Briefly explain how each can benefit users of computers.
 64‐Bit processing.
 Virtualization support.

Answers

Answer:

64-Bit Processing - Faster processing times, faster loading times

Virtualization Support - Ability to run one OS (including its hardware) on another, different, OS (such as emulating AndroidOS on RaspberryPiOS)

differentiate between soft copy output and hard copy output?​

Answers

a hard copy stores data and information in the form of physical files it may be images text photographs and more a soft copy data and information in the form of virtual file saved on a computer or a drive you can preserve a hard copy for two long because its day subjected to wear and tear

Answer:

Soft copy output -

when the output is in the form of soft copy ( I.e I'm the computer) you cannot touch it. it's the digital version.

Hard copy output -

when output is in the form of hard format (.ie paper, print , xerox etc) you can touch it.

which is an example of analog d


evice​

Answers

Answer:

crt (cathode ray tube) vcr (video cassette recorder)

Explanation:

Why do you guys the internet who are planning to be Information technology technician?

Answers

Answer:

The biggest advantage of choosing information technology for a career is that it has a very low cost of education as compared to many other career choices. You don't need a 4-year degree to become an I.T. professional. Instead, you can get quick training to be certified in specific areas of Information Technology.

Make a String ArrayList.Then write a Java method that swaps the first and last elements.

Answers

Answer:In order to swap elements of ArrayList with Java collections, we need to use the Collections.swap() method. It swaps the elements at the specified positions in the list.

Declaration −The java.util.Collections.swap() method is declared as follows

public static void swap(List <?> list, int i, int j)

where i is the index of the first element to be swapped, j is the index of the other element to be swapped and list is the list where the swapping takes place.

Explanation:

import java.util.*;

public class Example {

  public static void main (String[] args) {

    ArrayList<Integer> list = new ArrayList<Integer>();

     list.add(10);//0

     list.add(20);//1

     list.add(30);//2

     list.add(40);//3

     list.add(50);//4

     System.out.println("Original list : " + list);

     Collections.swap(list, 4, 0); // swapping element at index 3 i.e. 50 and index 1 i.e. 10

     System.out.println("List after swapping : " + list);

  }

}

Which frequency will 802.11n work on if on a single-link network?

Answers

802.11n can function in "mixed mode" on the 2.4 GHz frequency, with a theoretical maximum speed of 300 Mbps, or on the 5 GHz frequency.

What do you mean by frequency?

In the case of electrical current, frequency is the number of times a sine wave repeats or completes, a positive-to-negative cycle.

802.11n can operate in "mixed mode" on the 2.4 GHz frequency, which will support just 802.11b or 802.11g-capable systems but will slow the entire network down to the maximum speed of the earliest standard connected, at a theoretical maximum speed of 300 Mbps.

Learn more about the single-link network:

https://brainly.com/question/4272298

#SPJ1

What is an example of something that can be done through Personal Automation?

Answers

Answer:

For example, at an insurance company, an underwriter could use a personal automation to extract data from third-party systems to assess risk. A relationship manager at an insurance company can set up a personal automation to validate and reconcile data in a customer relationship management (CRM) system.

What is the optimal number of members for an Agile team?

Answers

5 or 6 people

Explanation:

Second, for those of you who demand a prefer an answer upfront, here it is – the optimal number of members for an agile team is 5 or 6 people. That is 5 or 6 team members and excludes roles like Scrum Master, Product Owner, and God forbid, Project Manager.

Predicate Logic The following is a snippet of pseudocode designed to produce an array (similar to a matrix). The variables m and n are integer variables and the variable A is a two-dimensional array with 10 rows (indexed from 1 to 10) and 8 columns (indexed from 1 to 8). \array.pas\ For m:=1to * 10do For n:=1to * 8do forall m bullet forall n bullet A[m, n]in mathbb Z . (d) The entries in each row of the array A are sorted into strictly decreasing order. You will also be asked to decide whether each statement is True or False. For example, the above statement is True. As an example, the statement "All entries in the array A are integers." can be expressed as (e) Some of the entries of the array A are greater than 30. (b) All entries in the array A are positive and less than 70. 1. Express each of the statements below in predicate logic. (a) All entries in the array A are positive. In the code above, A[m.n] refers to the entry in row m and column n Your task is to express the various statements bel

Answers

The answer is A are greater

def multiplication_table(number): # Initialize the starting point of the multiplication table multiplier = 1 # Only want to loop through 5 while multiplier <= 5: result = multiplier * number # What is the additional condition to exit out of the loop? if multiplier > 5 : break print(str(number) + "x" + str(multiplier) + "=" + str(result)) # Increment the variable for the loop multiplier += 1 multiplication_table(3) # Should print: 3x1=3 3x2=6 3x3=9 3x4=12 3x5=15 multiplication_table(5) # Should print: 5x1=5 5x2=10 5x3=15 5x4=20 5x5=25 multiplication_table(8) # Should print: 8x1=8 8x2=16 8x3=24

Answers

In this def multiplication_table(number): # Initialize the starting point of the multiplication table multiplier = 1 * number # the additional condition to exit out of the loop is by the increment the variable for the loop multiplier.

How do you are making a multiplication desk for a loop in Python?Code the usage of a for loop ourNum = int(input("Enter the quantity you need to generate a multiplication desk for, then hit the `enter` key: "))ourRange = range(1,6)for x in ourRange:result = ourNum * x.print(ourNum," * ",x," = ",result.

If the numbers multiplier increases then the starting point of the multiplication table multiplier will be greater than 25 and will increase.

Read more about the multiplication table:

https://brainly.com/question/12617401

#SPJ1

who stronger than the rock or jhon cena
a the rock
b jhon cena

Answers

the rock because he is strong, I don't know

Answer: John Cena

Explanation:

John Cena is stronger than the rock

MY POST

Where the integrity of a system is more important than the confidentiality or availability of that system?

In the case of financial information, integrity is more crucial than the other CIA objectives. If information is released and its secrecy is violated, it provides the opponent with more information about your account. However, if the information's or account's integrity is compromised, the data cannot be confirmed and is no longer accurate, which could have grave repercussions (Henderson, 2019)


PLEASE RESPOND TO THIS QUESTION: In my post how would you define "integrity of a system" in the question that I responded to? Please define and give references to the definition. Thanks

Answers

information confidentiality is said to be more important than integrity or availability in the issue of proprietary information of any firm.

What is integrity of a system?

This is known to be the quality that a system has in regards to how it carry out its owned or given function in an unhindered way, free from unauthorized tampering and others.

information confidentiality is said to be more important than integrity or availability in the issue of proprietary information of any firm.

Learn more about System integrity from

https://brainly.com/question/11337417

#SPJ1

Other Questions
The following excerpt comes from the International Bottled Water Association"In 2012, total U.S. bottled water consumption increased to 9.67 billion gallons, up from 9.1 billion gallons in 2011. In fact, 2012's consumption growth was the strongest it has been in five years. In addition,per-capita consumption is up 5.3 percent in 2012, with every person in America drinking an average of 30.8 gallons of bottled water last year. Bottled water increased in absolute volume more than any otherbeverage category in the U.S. Bottled water sales increased by 6.7 percent in 2012, and now total $11.8 billion."(i) Estimate the per capita consumption from 2011 from data in the statement. Express your answer rounded correctly to the nearest tenth of a gallon. Assuming two hikers begin at a trail start, which scenarios must be true based on the table? Check all that apply.Melissa and Corey started on different trails.Melissa hiked up the trail for a longer period of time than Corey.Melissa and Corey crossed paths between 60 and 90 minutes.Corey began his descent before Melissa.As Melissas time increased from 0 to 60 minutes, her elevation decreased. Graph the inequality.y > |x-2| -5 she and ________ are forming a new committee. Abigail works as a salesperson at an electronics store and sells phone: accessories. Abigail earns a $12 commission for every phone she sells commission for every accessory she sells. On a given day, Abigail mad $258 in commission and sold 6 more accessories than phones. Write a equations that could be used to determine the number of phones sold a number of accessories sold Define the variables that you use to write thigail works as a salesperson at an electronics store and sells phones and phone cessories. Abigail earns a $12 commission for every phone she sells and a $3 mmission for every accessory she sells. On a given day, Abigail made a total of 258 in commission and sold 6 more accessories than phones. Write a system of quations that could be used to determine the number of phones sold and the umber of accessories sol Define the variables that you use to write the system. Drag the tiles to the correct boxes to complete the pairs.Match the characteristics to the different creditors.Angel InvestorsAsset Backed LendingFriends and FamilySmaller Banks Mention the features of Lichchhavi Nepali sculpture. Jamie owns a house painting service. for each house, she charges $70 plus $40 per hour of work. a linear equation that expresses the total amount of money jamie earns per house is y=70+40x. what are the independent and dependent variables? what is the y-intercept and the slope? f(x) = x. What is g(x)? Can anyone help me answer this, please!!What distinguishes Caillebotte's painting from the works of more traditional Impressionist painters? Do you prefer this style over the works of Claude Monet? Why or why not? When a scientific theory has been tested and proved by the scientific community, it becomes a law.TrueFalse [20 Points]Add the expressions 4- 2/3b+ 1/4a and 1/2a + 1/6b -7 . What is the simplified sum?A: -1/6a + 5/12b - 3B: 3/4a + 1/2b - 3C: 3/4a + 5/6b - 3D: 5/12a - 1/6b - 3 Water's specific heat capacity is 4.184 J/(g C). How does this compare to the heat capacities of most common substances? which of the following is an enzyme required by the process of rephosphory,to create ATP? A) AD Pase B)AT Pase C)Polymerase D)AT synthase ? 4. T or F X-rays, ultraviolet light, and gamma rays all can travel through interplanetary space, so they are examples of waves. 5. What happens to the amplitude of water waves as you get farther from the disturbance that caused them? Why? A _______ histogram has the same shape and horizontal scale as a histogram, but the vertical scale is marked with relative frequencies instead of actual frequencies. The buildup of fatty tissues in the heart makes it more difficult for the heart to function.a) trueb) false For this PYTHON lab, we will use functions and imported functions to write a calculation program to do the following: o Write a program that do the following unit conversion based on user menu selection: (use while loop until the user enter 99 selection to Quit) 1. Calculate Interest Rate 2. Calculate Mortgage 99 Quit If user choice selection 1, then calculate interest rate. Modify your interest rate lab program to be a function. Save this program to simple_interest.py filename in the current lab folder. Use import to include the function in your main program. o If user choice selection 2, then calculate mortgage. For this, you need to write a python program function that will calculate mortgage payment. Save the program to mortgage.py filename. You can modify the interest program with the following formulate: 1. How to calculate mortgage payment: (You MUST use the following test cases) Assume loanAmount = $100,000 Assume interestRate = 3.25% Assume loanTerm = 15 years Then formula for mortgage calculation is: monthlyRate = (interestRate / 100) / 12 numPayments = loanTerm * 12 monthlyPayment = loanAmount * monthlyRate \ * pow((1 + monthlyRate), numPayments) \ / (pow((1 + monthlyRate),numPayments) - 1) totalPayment = monthlyPayment * (loanTerm * 12) interestPaid = totalPayment - loanAmount monthlyPayment would be: $702.67 totalPayment would be: $126,480.38 interestPaid would be: $26,480.38PLEASE ANSWER WILL DO ANYTHING WILL MARK BRAINLIEST A results force of 25newtons acts on a mass of 0.50kilogram starting from rest .find acceleretion in m/s2 , the final velocity after 20seconds, the distance moved in m If 15 members vote to choose 4 group leaders, what is the probability that 4 candidates will be chosen for 4 positions