exam1PRAC - CIS 200 Exam 1 (50 points) Tuesday, September...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 200 Exam 1 (50 points) Tuesday, September 15, 2009 Name: ______________________________________ This test is closed-books and closed-notes. Please do your own work. 1. (6 pts) Write a complete Java program (everything that would go in the .java file) that prints the following information to the screen. Your information should be displayed exactly as it is below. CIS 200: Exam 1 Tues., Sept. 15, 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. (12 pts) Write a code fragment with a loop that repeatedly asks the user to enter a character. Keep doing this until the user enters ‘q’. Afterwards, print how many times you had to ask before the user entered a ‘q’ . (For example, if the user entered ‘r’, ‘s’, ‘a’, ‘q’, you would print that you had to ask 4 times before a ‘q’ was entered.) You do not need to look for a ‘Q’, just a ‘q’. You will need to set up a Scanner to get the user input.
Background image of page 2
3. (10 pts) Suppose we have declared and initialized the following variables: int num1 = 52; int num2 = 11;
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/02/2010 for the course CIS 200 taught by Professor Staff during the Spring '08 term at Kansas State University.

Page1 / 5

exam1PRAC - CIS 200 Exam 1 (50 points) Tuesday, September...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online