QBASIC PROGRAM TO FIND SIMPLE INTEREST AND AMOUNT

QBASIC PROGRAM TO FIND SIMPLE INTEREST AND AMOUNT



 CLS
 INPUT “ENTER PRINCIPAL”; P
 INPUT “ENTER TIME”; T
 INPUT “ENTER RATE”;R
 I = P* T * R / 100
 A = P + I
 PRINT "SIMPLE INTEREST=";I
 PRINT “TOTAL AMOUNT=”; A
 END

USING SUB


DECLARE SUB AMOUNT(P,T,R)
 CLS
 INPUT “ENTER PRINCIPAL”; P
 INPUT “ENTER TIME”; T
 INPUT “ENTER RATE”;R
 CALL AMOUNT(P,T,R)
 END
 
 SUB AMOUNT(P,T,R)
 I = P* T * R / 100
 A = P + I
 PRINT "SIMPLE INTEREST=";I
 PRINT “TOTAL AMOUNT=”; A
 END SUB

Post a Comment

0 Comments