Answered step by step
Verified Expert Solution
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.
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 endfStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started