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
Molodets [167]
3 years ago
11

mips Write a program that asks the user for an integer between 0 and 100 that represents a number of cents. Convert that number

of cents to the equivalent number of quarters, dimes, nickels, and pennies. Then output the maximum number of quarters that will fit the amount, then the maximum number of dimes that will fit into what then remains, and so on. If the amount entered is negative, write an error message and quit. Amounts greater than 100 are OK (the user will get many quarters.) Use extended assembly instructions and exception handler services.
Computers and Technology
1 answer:
Mumz [18]3 years ago
8 0

Answer:

Explanation:

The following code is written in python and divides the amount of cents enterred in as an input into the correct amount of quarters, dimes, nickels and pennies. Finally, printing out all the values.

import math

#First we need to define the value of each coin

penny = 1

nickel = 5

dime = 10

quarter = 25

#Here we define the variables to hold the max number of each coin

quarters = 0

dimes = 0

nickels = 0

pennys = 0

cents = int(input("Please enter an amount of money you have in cents: "))

if cents > 0 and cents <= 100:

   if cents >= 25:

       quarters = cents / quarter

       cents = cents % quarter

   if cents >= 10:

       dimes = cents/dime

       cents = cents % dime

   if cents >= 5:

       nickels = cents /nickel

       cents = cents % nickel

   if cents > 0:

       pennys = cents / penny

       cents = 0

   print("The coins are: "

       "\nQuarters", math.floor(quarters),

       "\nDimes", math.floor(dimes), "\nNickels", math.floor(nickels), "\nPennies", math.floor(pennys))

else:

   print("wrong value")

You might be interested in
Differentiate between inherited trait and acquired trait​
miskamm [114]

Answer: Inherited trait is something you already have and acquired is something that you learn or achieve.

Explanation:

8 0
3 years ago
Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
vaieri [72.5K]

Answer:

Bartering is the correct answer.

Explanation:

Kai is the engineer that setup his company of IT and his friend who sells the goods for his company. Then he decided to develop a software of the stock management for his friend's store for this his friend gives the required office goods and equipment for his company. So, the bartering is best suited for the following statement.

8 0
4 years ago
Read 2 more answers
According+to+gartner+research,+by+2020,+_____+will+be+the+greatest+source+of+competitive+advantage+for+30%+of+organizations.
pentagon [3]

According to Gartner Research, by 2020, digital dexterity will be the greatest source of competitive advantage for 30% of organizations.

Organizations are under increasing pressure to keep up with the ever-changing digital landscape. To stay ahead of the competition, many are turning to digital dexterity as a source of competitive advantage.

Gartner Research predicts that by 2020, digital dexterity will be the greatest source of competitive advantage for 30% of organizations. To achieve digital dexterity, organizations need to be able to rapidly adapt to changing market conditions and technologies.

To stay ahead of the competition, organizations need to invest in training and development programs that will help employees stay up-to-date with the latest digital trends. Additionally, organizations need to create a culture of innovation that encourages employees to experiment with new technologies and ideas.

By 2020, digital dexterity will be a critical source of competitive advantage. Organizations that are able to effectively harness the power of digital technology will be well-positioned to succeed in the future.

Learn more here:

brainly.com/question/17178886

#SPJ4

7 0
2 years ago
What is the origin of the name “breadboard”?
8090 [49]

Answer:

Originally the word referred to a literal bread board, a polished piece of wood used for slicing bread. In the 1970s the solderless breadboard ( a.k.a. plugboard, a terminal array board) became available and nowadays the term "breadboard" is commonly used to refer to these.

7 0
4 years ago
Which of the following is a locate tool that will enable you to navigate to cell M291?
scoundrel [369]

just answered it its<u><em> Go To</em></u>

3 0
4 years ago
Other questions:
  • Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift
    5·1 answer
  • The disk drive is a secondary storage device that stores data by _____ encoding it onto a spinning circular disk.
    14·1 answer
  • You locate a web page that includes "edu" in the address, along with other words and symbols. the page is simple—a plain backgro
    8·1 answer
  • When using IPsec, how can you ensure that each computer uses its own private key pair?
    12·1 answer
  • What is one of the most effective security tools available for protecting users from external threats?
    15·1 answer
  • PLEASE HELP ASAP IT'S DUE TODAY! WILL GIVE BRAINLIEST, FIVE STARS, AND THANKS!! PLEASE HELP!
    12·1 answer
  • Let’s say you attach four images to accompany an important tweet that you’ve composed in the Hootsuite Compose Box. On Twitter,
    8·1 answer
  • What is the primary purpose of the destination address?
    9·1 answer
  • Which of the following is an example of metadata about a webpage?
    7·2 answers
  • What is a functional organisation? and how it functions​?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!