New Questions Answers of SUB...END SUB
1.Write a program to define a sub procedure Sum(a,b) to display sum of any two numbers input by a user.
DECLARE SUB Sum(a,b)
CLS
INPUT "ENTER A FIRST NUMBER";a
INPUT "ENTER A SECOND NUMBER";b
CALL Sum(a,b)
END
SUB Sum(a,b)
s=a+b
PRINT "SUM=";s
END SUB
DECLARE SUB Sum(a,b)
CLS
INPUT "ENTER A FIRST NUMBER";a
INPUT "ENTER A SECOND NUMBER";b
CALL Sum(a,b)
END
SUB Sum(a,b)
s=a+b
PRINT "SUM=";s
END SUB
2. Write a program to display area of a rectangle by using SUB...END SUB. This program allows a user to input required data in the main module.
DECLARE SUB areaRectangle(l,b)
CLS
INPUT "ENTER A LENGTH ";l
INPUT "ENTER A BREADTH";b
CALL areaRectangle(l,b)
END
SUB areaRectangle(l,b)
area=l*b
PRINT "AREA IS ";area
END SUB
Comments
(And actually, it has NOTHING to do with genetics or some hard exercise and absolutely EVERYTHING related to "HOW" they eat.)
P.S, What I said is "HOW", and not "what"...
Tap on this link to uncover if this easy quiz can help you find out your true weight loss potential