Solved

What for Loop Can Be Used in the Indicated Area

Question 63

Multiple Choice

What for loop can be used in the indicated area so the code will print: ****
***
**
*
For (int val = 0; val < 4; val ++)
{
System.out.print ("+") ;
// Put for loop here
{
System.out.print ("*") ;
}
System.out.println () ;
}


A) for (int num = 0; num < 4 - val; num++)
B) for (int num = 0; num < val; num++)
C) for (int num = 4; num < val; num++)
D) for (int num = 4; num > 0; num--)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions