11/02 Assignment

Last updated over 1 year ago
5 questions
1

What is the output?

int i=7;
if( i < 10 )
out.println("aplus");
else
out.println("compsci");

1

What is the output?

int x=11;
if( x < 10 )
out.println("aplus");
else
out.println("compsci");

1

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

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

What is the output?

int j=52;
if( j > 10 )
if( j > 20 )
if( j > 30 )
out.println("compsci");
else
out.println("speed");