CLS
PRINT "Enter the following... "
INPUT "Principle : "; p
INPUT "Time : "; t
INPUT "Rate : "; r
i = (p * t * r) / 100
PRINT "Simple Interest (I) = "; i
END
PRINT "Enter the following... "
INPUT "Principle : "; p
INPUT "Time : "; t
INPUT "Rate : "; r
i = (p * t * r) / 100
PRINT "Simple Interest (I) = "; i
END
Calculate Simple Interest Using SUB Procedure
DECLARE SUB interest(p,t,r)
CLS
PRINT "Enter the following... "
INPUT "Principle : "; p
INPUT "Time : "; t
INPUT "Rate : "; r
CALL interest(p, t, r)
END
SUB interest (p, t, r)
i = (p * t * r) / 100
PRINT "Simple Interest (I) = "; i
END SUB
CLS
PRINT "Enter the following... "
INPUT "Principle : "; p
INPUT "Time : "; t
INPUT "Rate : "; r
CALL interest(p, t, r)
END
SUB interest (p, t, r)
i = (p * t * r) / 100
PRINT "Simple Interest (I) = "; i
END SUB
Calculate Simple Interest Using FUNCTION Procedure
DECLARE FUNCTION interest(p,t,r)
CLS
PRINT "Enter the following... "
INPUT "Principle : "; p
INPUT "Time : "; t
INPUT "Rate : "; r
i = interest(p, t, r)
PRINT "Simple Interest (I) = "; i
END
FUNCTION interest (p, t, r)
i = (p * t * r) / 100
interest = i
END FUNCTION
CLS
PRINT "Enter the following... "
INPUT "Principle : "; p
INPUT "Time : "; t
INPUT "Rate : "; r
i = interest(p, t, r)
PRINT "Simple Interest (I) = "; i
END
FUNCTION interest (p, t, r)
i = (p * t * r) / 100
interest = i
END FUNCTION
No comments:
Post a Comment
If you have any doubts, Please let me know.