Docstoc

Solve problem by using Fortran

Document Sample
Solve problem by using Fortran Powered By Docstoc
					Question:
A man borrows $300.00 from a bank at an interest rate of 1.5 percent per month. He repays
$25.00 at the end of each month.
Write a Fortran Program which finds the number of months that he must make payments on the
loan and the amount of his last month.

C   Input:

   b=300.00
   r=1.50
   k=0
10 b=b+b*r/100.00-25.
   IF (b.LE.25) THEN
   PRINT*,'NUMBER OF MONTH=', k+1
   PRINT*,'LAST INSTALMENT=', b
   ENDIF
   k=k+1
   IF (b.ge.25) GOTO 10
   END


Output:

NUMBER OF MONTH=      13
LAST INSTALMENT= 8.14500

				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:7
posted:2/11/2013
language:English
pages:1
Description: Solve the problem by using fortran command.