Wednesday, October 16, 2019

10. Qbasic Program to calculate and print the simple interest


10.      Write a program to calculate and print the simple interest using FUNCTION……END FUNCTION.

DECLARE FUNCTION INTEREST (P, T, R)
CLS
INPUT “ENTER PRINCIPAL”; P
INPUT “ENTER TIME”; T
INPUT “ENTER RATE”;R
PRINT “SIMPLE INTEREST=”; INTEREST (P, T, R)
END

FUNCTION INTEREST (P, T, R)
I = P* T * R / 100
INTEREST = I
END FUNCTION

No comments:

Post a Comment