QBASIC PROGRAM TO PRINT SIMPLE INTEREST USING FUNCTION.
DECLARE FUNCTION SIMPLE(P,T,R)
CLS
INPUT "ENTER PRINCIPLE";P
INPUT"ENTER TIME";T
INPUT"ENTER RATE";R
PRINT"SIMPLE INTEREST=";SIMPLE(P,T,R)
END
FUNCTION SIMPLE (P,T,R)
S=(P*T*R)/100
SIMPLE=S
END FUNCTION
DECLARE FUNCTION SIMPLE(P,T,R)
CLS
INPUT "ENTER PRINCIPLE";P
INPUT"ENTER TIME";T
INPUT"ENTER RATE";R
PRINT"SIMPLE INTEREST=";SIMPLE(P,T,R)
END
FUNCTION SIMPLE (P,T,R)
S=(P*T*R)/100
SIMPLE=S
END FUNCTION
Comments
Post a Comment