QBasic Programming

calculate cost price where profit percentage and selling price is given

REM PROGRAM TO CALCULATE COST PRICE WHERE PROFIT PERCENTAGE AND SELLING PRICE IS GIVEN
CLS
INPUT “ENTER SELLING PRICE”; SP
INPUT “ENTER PROFIT PERCENTAGE”; PP
CP = (SP * 100) / (100 + PP)
PRINT “COST PRICE=”; CP
END

USING SUB PROCEDURE

DECLARE SUB COSTP (SP, PP)
CLS
INPUT “ENTER SELLING PRICE”; SP
INPUT “ENTER PROFIT PERCENTAGE”; PP
CALL COSTP(SP, LP)
END

SUB COSTP(SP, PP)
CP = (SP * 100) / (100 + PP)
PRINT “COST PRICE=”; CP
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION COSTP (SP, PP)
CLS
INPUT “ENTER SELLING PRICE”; SP
INPUT “ENTER PROFIT PERCENTAGE”; PP
PRINT “COST PRICE=”; COSTP(SP, PP)
END

FUNCTION COSTP(SP, PP)
CP = (SP * 100) / (100 + PP)
COSTP = CP
END FUNCTION

calculate cost price where loss percentage and selling price is given (Prev Lesson)
(Next Lesson) Input selling price and cost price calculate profit or loss 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 !!