Uber Fr0g
02-14-2006, 04:02 AM
hey, im having a little trouble with my compiler and need a little help determining the output of a program. I need to determine the output for the following code sets when x is 9 and y is 11, and when x is 11 and y is 9. I tried to figure it out on paper but im new to java and struggling a bit.
heres the code:
if (x < 10 )
if (y > 10)
System.out.println( "*****" );
else
System.out.println( "#####" );
System.out.println( "$$$$$");
if (x < 10 )
{
if (y > 10)
System.out.println( "*****" );
}
else
{
System.out.println( "#####" );
System.out.println( "$$$$$");
}
heres the code:
if (x < 10 )
if (y > 10)
System.out.println( "*****" );
else
System.out.println( "#####" );
System.out.println( "$$$$$");
if (x < 10 )
{
if (y > 10)
System.out.println( "*****" );
}
else
{
System.out.println( "#####" );
System.out.println( "$$$$$");
}