REM PROGRAM TO CONVERT KILOMETER TO MILES

CLS

INPUT”ENTER DISTANCE IN KILOMETER”; K

M = K * 0.62

PRINT “DISTANCE IN MILES=”; M

END

USING SUB PROCEDURE

DECLARE SUB CONVERT(K)

CLS

INPUT”ENTER DISTANCE IN KILOMETER”; K

CALL CONVERT(K)

END

SUB CONVERT (K)

M = K * 0.62

PRINT “DISTANCE IN MILES=”; M

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CONVERT(K)

CLS

INPUT”ENTER DISTANCE IN KILOMETER”; K

PRINT “DISTANCE IN MILES=”; CONVERT(K)

END

FUNCTION CONVERT (K)

M = K * 0.62

CONVERT = M

END FUNCTION

## No Comments