This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Question 27 (Worth 3 points)
Write a Java Program
Write a single Java Systemoutprintln statement that generates the following lines of output (you will need to use \t and \n escape characters): There were
Hﬁﬂ three ,
rtigers,_and
,"f0urr ,
lions.’ ', ESSAY SUBMISSION I
Systemout.println("There were\n\tth'ree\ntigers, and\n\tfour\nlions.“); Answer Key for Homework #3
Question 1 (Worth 3 points)
Arithmetic Operators Using the arithmetic rules of Java, calculate the value of the following expression: ’2“ +: 3 *4 24 Question 2 (Worth 3 points)
Arithmetic Operators Using the arithmetic’rules of Java, calculate the value ’of the following expression: ,'7<4' ,+ 1'). *3 '
i... 7
r“ 8 12
£1“
15 This is; correct answer Question 3 (Worth 3 points)
Arithmetic Operators Using the arithmetic rules of Java, calculate the value of the following expression: 2",%"4"r,+_3'" * 10', 68 110 Question 4 (Worth 3 points)
Arithmetic Operators Using the arithmetic rules of Java, calculate the value of the following expression: 10, /: 3' " /
1w» 0
.5“ 0.33 3
"This; a: esprs'egecz f“ 3.0
g“ 3.33 ...
View
Full Document
 Summer '08
 STAFF
 Algebra, operation, arithmetic operators

Click to edit the document details