Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INCLUDE asmLib.inc yearlyBalance PROTO . data promptBalance BYTE Enter your balance , 0 promptRate BYTE Enter the interest rate ( like 5 . 0

INCLUDE asmLib.inc
yearlyBalance PROTO
.data
promptBalance BYTE "Enter your balance ",0
promptRate BYTE "Enter the interest rate (like 5.0)",0
promptYears BYTE "Enter the number of years ",0
balance REAL8?
rate REAL8?
term REAL8?
.code
main PROC
mov edx, OFFSET promptBalance
call writeLine
call readFloat
fstp balance
mov edx, OFFSET promptRate
call writeLine
call readFloat
fstp rate
mov edx, OFFSET promptYears
call writeLine
call readInt
mov term, eax
fld balance
fld rate
fld term
call yearlyBalance
exit
main ENDP
END main I need help creating a yearlyBalances PROC. I have to calculate adjusted balances. The output should look like this Enter your balance
1000
Enter the interest rate (like 5.0)
5.0
Enter the number of years
10
Year: 1: $1050.00
Year: 2: $1102.50
Year: 3 $1157.63
Year: 4: $1215.51
Year: 5: $1276.28
Year: 6: $1340.10
Year: 7: $1407.10
Year: 8: $1477.46
Year: 9: $1551.33
Year: 10: $1628.89
Press any key to continue ... It is really important balance, rate, and term are passed on the floating-point stack. adjusted balance = initial balance + interest. and interest = balance * rate /100.0

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

Students also viewed these Databases questions