OUTPUT |
CLS
a = 11111
WHILE a <> 0
PRINT a * a
a = a \ 10
WEND
END
a = 11111
WHILE a <> 0
PRINT a * a
a = a \ 10
WEND
END
Using SUB Procedure
DECLARE SUB PATTERN()
CALL PATTERN
END
SUB PATTERN
a = 11111
WHILE a <> 0
PRINT a * a
CALL PATTERN
END
SUB PATTERN
a = 11111
WHILE a <> 0
PRINT a * a
a = a \ 10
WEND
END SUB
END SUB
Using FUNCTION Procedure
DECLARE FUNCTION PATTERN()
p = PATTERN
END
FUNCTION PATTERN
a = 11111
WHILE a <> 0
p = PATTERN
END
FUNCTION PATTERN
a = 11111
WHILE a <> 0
PRINT a * a
a = a \ 10
WEND
END FUNCTION
END FUNCTION
No comments:
Post a Comment
If you have any doubts, Please let me know.