Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SSTUD111

SSTUD111.m

Go to the documentation of this file.
SSTUD111 ;EXERCISE1 [ 08/08/01  12:42 PM ]
 ;
 D ^TRG1INFO
 ;
START ;
 READ !,?20,"INTER PURCHASE PRICE:  ",PURPRICE
 READ !,?20,"INTER INTREST RATE:  ",INT
 READ !,?20,"INTER TIME PERIOD:  ",TIME
 ;
 S FINCOST=PURPRICE*INT
 S TOTPUR=PURPRICE+FINCOST
 ;
 WRITE !,?20,"TOTAL PURCHASE PRICE IS ",TOTPUR
 ;
 ;
LEASE ;DO WE WANT TO LEASE THIS
 READ !,?20,"MONTHLY LEASE COST ",MONCOST
 READ !,?20,"NUMBER OF PAYMENTS ",NRPAYM
 READ !,?20,"LUMP SUM COST ",LUMP
 SET TLEASE=MONCOST*NRPAYM
 S TLEASPUR=TLEASE+LUMP
 WRITE !,?20,"TOTAL LEASE PURCHASE PRICE ",TLEASPUR
 ;
DECISION ;Decision to purchase or lease
 ;
 IF TLEASPUR=PURPRICE WRITE !!,"IT REALLY DOESN'T MATTER"
 IF PURPRICE>TLEASPUR WRITE !!,"LEASE IT"
 IF TLEASPUR>PURPRICE WRITE !!,"PURCHASE IT"
 ;
CHECK ;DO YOU WANT ANOTHER
 READ !!," YOU WANT TODO ANOTHER?YES//",ANSWER
 IF ANSWER="" GOTO START
 IF ANSWER="YES" GOTO START
 IF ANSWER="YES" GOTO START