28 lines
329 B
Plaintext
28 lines
329 B
Plaintext
DECLARE Multiply(N1:INT,N2:INT)
|
|
|
|
DEF A,B:INT
|
|
|
|
A=2:B=2
|
|
|
|
OPENCONSOLE
|
|
|
|
PRINT Multiply(A,B)
|
|
|
|
PRINT:PRINT"Press any key to close."
|
|
|
|
DO:UNTIL INKEY$<>""
|
|
|
|
CLOSECONSOLE
|
|
|
|
END
|
|
|
|
SUB Multiply(N1:INT,N2:INT)
|
|
|
|
DEF Product:INT
|
|
|
|
Product=N1*N2
|
|
|
|
RETURN Product
|
|
|
|
'Can also be written with no code in the subroutine and just RETURN N1*N2.
|