DOC PREVIEW
UMD CMSC 250 - Quiz #1

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Name (printed):Student ID #:Section # (or TA’s:name and time)CMSC 250 Quiz #1 Wed., August 31, 2005Write all answers legibly in the space provided. The number of points possible for each question is indicatedin square brackets – the total number of points on the quiz is 30, and you will have exactly 10 minutes tocomplete this quiz. You may not use calculators, textbooks or any other aids during this quiz.You MUST SHOW YOUR WORK for complete credit.1. [8 pnts.] Solve for the numeric value of x in each of the following.a. x = log464 − log39b. x =3(26+13)c. 4 = log5(x2)d. x = log212 − log262. [7 pnts.] The 0th elemen t of the Fibonacci sequence is 0. The 1st element of the Fibonacci sequenceis 1. The nth element of the Fibonacci sequence is defined as the sum of the (n-1)th and (n-2)th.Write a recursive method with signature:public int fibonacci(int n);that will return the nth element of the Fibonacci sequence.3. [9 pnts.] Reduce each of the following to a polynomial in the least number of terms.a. x ∗ x2− x2b. (x2− 2x − 3)(1x+1)c. (x +2)(x2− 1)(x)4. [6 pnts.] Given the following Java Code:public int mystery(int n) throws Exception {System.out.print(n); System.out.print(" ");if (n > 100) {return n-10;}else {return mystery(mystery(n+11));}}What is the output of the calling


View Full Document

UMD CMSC 250 - Quiz #1

Download Quiz #1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Quiz #1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Quiz #1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?