Unit 5 If Statements
aplus howdy
What is the output?
compsci aplus howdy
What is the output?
howdy
What is the output?
-1
What is the output? Test now = new Test( ); out.println( now.try(10) );
6
What is the output? Test now = new Test( ); out.println( now.try(15) );
4
What is the output? Test now = new Test( ); out.println( now.try(33) );
aplus howdy
int a = 1; if (a > 2); out.println("aplus"); out.println("howdy");
aplus howdy
int a = 5; if (a > 2); out.println("aplus"); out.println("howdy");
howdy compsci
int b=11, c=11; if( b < 10 ) out.println("aplus"); if( c > 10 ) out.println("howdy"); out.println("compsci");
compsci
int b=20, c=10; if( b < 10 ) out.println("aplus"); if( c > 10 ) out.println("howdy"); out.println("compsci");
aplus howdy compsci
int b=7, c=11; if( b < 10 ) out.println("aplus"); if( c > 10 ) out.println("howdy"); out.println("compsci");
aplus compsci
int e=7, f=11; if( e < 10 ) out.println("aplus"); if( f < 10 ) out.println("howdy"); out.println("compsci");
aplus compsci
int m=3; if( m < 7) out.println("aplus"); out.println("compsci");
compsci
int m=7; if( m < 7) out.println("aplus"); out.println("compsci");
howdy compsci
int t = 7; if( t > 10) out.println("aplus"); out.println("howdy"); out.println("compsci");
compsci
int t = 7; if( t > 10) { out.println("aplus"); out.println("howdy"); } out.println("compsci");
compsci
int w=52; if(w<10) out.println("aplus"); if(w>10) out.println("compsci");
compsci
int x=13; if( x < 7) out.println("aplus"); out.println("compsci");