QBasic Programming

Input principal, rate, time and display total amount

REM PROGRAM TO DISPLAY TOTAL AMOUNT
CLS
INPUT “ENTER PRINCIPAL”; P
INPUT “ENTER TIME”; T
INPUT “ENTER RATE”;R
I = P* T * R / 100
A = P + I
PRINT “TOTAL AMOUNT=”; A
END
USING SUB PROCEDURE
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 “TOTAL AMOUNT=”; A
END SUB
USING FUNCTION PROCEDURE
DECLARE FUNCTION AMOUNT (P, T, R)
CLS
INPUT “ENTER PRINCIPAL”; P
INPUT “ENTER TIME”; T
INPUT “ENTER RATE”;R
PRINT “TOTAL AMOUNT=”; AMOUNT(P, T, R)
END
FUNCTION AMOUNT (P, T, R)
I = P* T * R / 100
A = P + I
AMOUNT = A
END FUNCTION

Display simple interest (Prev Lesson)
(Next Lesson) Input principal, rate, time and display simple interest and total amount
Back to QBasic Programming
Notice: compact(): Undefined variable: limits in /home/bhimgautam34/public_html/wp-includes/class-wp-comment-query.php on line 853

Notice: compact(): Undefined variable: groupby in /home/bhimgautam34/public_html/wp-includes/class-wp-comment-query.php on line 853

No Comments

Post a Reply

Course Curriculum

error: Content is protected !!