0% found this document useful (0 votes)
34 views1 page

American Computer Science League Junior Division 2012 - 2013 Contest #2

The document contains problems from the American Computer Science League Junior Division Contest #2 for 2012-2013. It includes tasks related to evaluating prefix expressions, converting infix to postfix expressions, and evaluating bit-string operations. Additionally, it features a programming problem that requires determining the output of a given code segment.

Uploaded by

CK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

American Computer Science League Junior Division 2012 - 2013 Contest #2

The document contains problems from the American Computer Science League Junior Division Contest #2 for 2012-2013. It includes tasks related to evaluating prefix expressions, converting infix to postfix expressions, and evaluating bit-string operations. Additionally, it features a programming problem that requires determining the output of a given code segment.

Uploaded by

CK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ACSL

2012 - 2013 American Computer Science League Contest #2


Junior Division

1. Prefix/Infix/Postfix
Evaluate the following prefix expression if all numbers are single
digits:
+ /+ 2 4 3 / * 4 + / 6 2 1 8

2. Prefix/Infix/Postfix
Convert the infix expression to a postfix expression.

A + B + C*(A – B)
C B+C

3. Bit-String Flicking
Evaluate the following expression:

(NOT (01101 OR 01011)) AND ( 01101 OR 00101)

4. Bit-String Flicking
Evaluate the following expression:

(LCIRC-2 (RSHIFT – 1 (RCIRC – 1 (LSHIFT – 1 01101))))

5. What Does This Program Do?


What is printed when this program is executed?

Z=0
FOR N = 100 TO 200 STEP 2
IF (N/3) = INT(N/3) THEN Z = Z + 1
IF (N/5) = INT(N/5) THEN Z = Z + 1
IF N/3 = INT(N/3) AND N/5 = INT(N/5) THEN Z=Z-1
NEXT N
PRINT Z
END

You might also like