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

C 1 JR PDF

1) The document is a computer science contest with 5 short problems involving computer number systems, recursion, and analyzing simple programs. Problem 1 asks to convert the octal number 246 to hexadecimal. Problem 2 involves solving an equation in base-16. Problem 3 asks for the final value of variable C after a simple loop program runs. Problem 4 requires calculating the recursive function f(6). Problem 5 calculates the recursive function f(7,4).

Uploaded by

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

C 1 JR PDF

1) The document is a computer science contest with 5 short problems involving computer number systems, recursion, and analyzing simple programs. Problem 1 asks to convert the octal number 246 to hexadecimal. Problem 2 involves solving an equation in base-16. Problem 3 asks for the final value of variable C after a simple loop program runs. Problem 4 requires calculating the recursive function f(6). Problem 5 calculates the recursive function f(7,4).

Uploaded by

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

American Computer Science League

2001-2002 Contest #1
Junior Division Short Problems

1. Computer Number Systems

Convert 246 from octal to hexadecimal

2. Computer Number Systems

Solve for X16

X16 = BA35816 + AE8BC16

3. What Does This Program Do

After the following program is run, what is the final value of C?

10 C = 0: K = 0: S = 1
20 IF S < 0 THEN C= C 1 ELSE C = C 1
30 K = K 1: S = S
40 IF K 8 THEN GOTO 20
50 END

4. Recursive Functions

Find f (6)

f (x 1)+x if x 4
f (x) = 2x otherwise

5. Recursive Functions

Find f (7,4)

x y if x 0
x f (x 2, y 1) if x 0 and x is even
f (x,y) =
y f ( y 2, x 1) if x 0 and x is odd

You might also like