Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, if the

Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, if the amount is 86 cents, the change would be 3 quarters, 1 dime. and 1 penny. 1. You can assume the input is between 1 and 99. 2. Only print out the coin type that is greater than 1. For example, for 86 cents, the Nickel: # line will not be in the output. image text in transcribed

image text in transcribed Please make sure its written in MIPS assembly language

Required I/O: Change by F. Last Enter the change? # Quarter: # Dime: # Nickel: # Penny: # Hints: HLL: if (to > 0) { output to } AL: # to is the number of Coin beqz to, endif # pseudo instruction # output string: "Coin: # output to # output new line endf: For example: .data coin: .asciiz "Coin: " newline: .asciiz " " .text main: # to contains the number of coin beqz to, endif # if t0 == 0, then goto endif la $a0, coin # output the coin li $v0, 4 syscall move $a0,$t0 $v0, 1 syscall la $a0, newline li $v0, 4 li endf

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago