11/02 Assignment
By Mickey Arnold
starstarstarstarstarstarstarstarstarstar
Last updated 10 months ago
5 Questions
1 point
1
Question 1
1.
What is the output?
int i=7;if( i < 10 ) out.println("aplus");else out.println("compsci");
What is the output?
int i=7;
if( i < 10 )
out.println("aplus");
else
out.println("compsci");
1 point
1
Question 2
2.
What is the output?
int x=11;if( x < 10 ) out.println("aplus");else out.println("compsci");
What is the output?
int x=11;
if( x < 10 )
out.println("aplus");
else
out.println("compsci");
1 point
1
Question 3
3.
What is the output?
int a=7, b=11;if( a < 10 ) out.println("aplus");if( b > 10 ) out.println("fun");else out.println("speed");
What is the output?
int a=7, b=11;
if( a < 10 )
out.println("aplus");
if( b > 10 )
out.println("fun");
else
out.println("speed");
1 point
1
Question 4
4.
What is the output?
int c=7, d=11;if( c < 10 ){ out.println("aplus"); if( d < 10 ) out.println("fun"); else out.println("compsci");}
What is the output?
int c=7, d=11;
if( c < 10 ){
out.println("aplus");
if( d < 10 )
out.println("fun");
else
out.println("compsci");
}
1 point
1
Question 5
5.
What is the output?
int j=52;if( j > 10 ) if( j > 20 ) if( j > 30 ) out.println("compsci"); else out.println("speed");
What is the output?
int j=52;
if( j > 10 )
if( j > 20 )
if( j > 30 )
out.println("compsci");
else
out.println("speed");