QBasic Programming

Input number as paise and convert into rupees only

REM PROGRAM TO CONVERT PAISE INTO RUPEES
CLS
INPUT “ENTER VALUE IN PAISE”; P
R = P / 100
PRINT P; “PAISE =”; “RS.”; R
END

USING SUB PROCEDURE

DECLARE SUB CONVERT (P)
CLS
INPUT “ENTER VALUE IN PAISE”; P
CALL CONVERT (P)
END

SUB CONVERT (P)
R = P / 100
PRINT P; “PAISE =”; “RS.”; R
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CONVERT (P)
CLS
INPUT “ENTER VALUE IN PAISE”; P
PRINT P; “PAISE =”; “RS.”; CONVERT(P)
END

FUNCTION CONVERT (IC)
R = P / 100
CONVERT = R
END FUNCTION

to accept currency value in Nepalese Rupees and convert into dollar (Prev Lesson)
(Next Lesson) Input days and convert into years, months and days
Back to QBasic Programming

No Comments

Post a Reply

Course Curriculum

error: Content is protected !!