QBasic Programming

An organization pays its employees allowance at the rate of 10% of basic salary. WAP to input the salary of the employees and calculate the allowances

CLS
INPUT “ENTER BASIC SALARY”; S
A = 10 / 100 * S
PRINT “ALLOWANCE=”; A
END

USING SUB PROCEDURE
DECLARE SUB ALLOWANCE (S)
CLS
INPUT “ENTER BASIC SALARY”; S
CALL ALLOWANCE (S)
END
SUB ALLOWANCE (S)
A = 10 / 100 * S
PRINT “ALLOWANCE=”; A
END SUB
USING FUNCTION PROCEDURE
DECLARE FUNCTION ALLOWANCE (S)
CLS
INPUT “ENTER BASIC SALARY”; S
PRINT “NET SALES=”; ALLOWANCE (S)
END

FUNCTION ALLOWANCE (S)
A = 10 / 100 * S
ALLOWANCE = S
END FUNCTION

Input sales amount and rate of commission then calculate commission and return nt sales. [ns=sa-c) (Prev Lesson)
(Next Lesson) Solve a quadratic equation ax2+bx+c=0 on the basis of the coefficient values a, b, and c
Back to QBasic Programming

No Comments

Post a Reply

Course Curriculum

error: Content is protected !!