QBasic Programming

calculate loss

REM PROGRAM TO CALCULATE LOSS
CLS
INPUT “ENTER COST PRICE”; CP
INPUT “ENTER SELLING PRICE”; SP
L = CP - SP
PRINT “LOSS AMOUNT=”; L
END

USING SUB PROCEDURE

DECLARE SUB LOSS (CP, SP)
CLS
INPUT “ENTER COST PRICE”; CP
INPUT “ENTER SELLING PRICE”; SP
CALL LOSS(CP, SP)
END

SUB LOSS (CP, SP)
L = CP - SP
PRINT “LOSS AMOUNT=”; L
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION LOSS (CP, SP)
CLS
INPUT “ENTER COST PRICE”; CP
INPUT “ENTER SELLING PRICE”; SP
PRINT “LOSS AMOUNT=”; LOSS(CP, SP)
END

FUNCTION LOSS (CP, SP)
L = CP – SP
LOSS = P
END FUNCTION

calculate profit (Prev Lesson)
(Next Lesson) calculate profit percentage
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 !!