

Note that an extra space will exist on the left of the string. STR$(A) converts the integer A into a string.LEN(A$) returns an integer representing the number of characters in the string A$. For example, if A$=”AMERICAN COMPUTER” then MID$(A$,7,5) would equal “AN CO”. MID$(A$,A,B) returns a string consisting of the B characters beginning with the Ath character of A$.RIGHT$(A$,N) returns a string consisting of the last N characters of the string A$.


Assume that our programs are immune to syntax errors, variables have enough storage (for example, one doesn’t need an explicit “DIM X(100)” in a program that uses an array with 100 elements). The following statements may be used: INPUT, DATA, READ, RESTORE, PRINT, TAB, FOR/NEXT, GOTO, GOSUB, RETURN, IF-THEN, IF-THEN-ELSE, LET, REM, DIM, DEF (for user defined functions), END and STOP.įiles and matrix commands will NOT be used. The functions NOT, AND and OR will also be used they have the order of precedence listed (that is, NOT is highest and OR is the lowest).The following system functions may be used: INT, ABS, LEFT$, RIGHT$, MID$, LEN, VAL, STR$, SQR and SGN. In the Junior Division, the specific topic to be tested is given in the title of the category.Topics covered in the Intermediate Division include (but are not limited to): the evaluation of arithmetic expressions, loops (single and nested), branching, subscripted variables, multi-dimensional arrays, and string manipulations.The questions will emphasize elementary structured flow of control rather than the particular syntax of the dialect. The dialect of BASIC that we will use is ACSL BASIC.
WHAT DOES THIS PROGRAM DO ACSL CODE
