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:
Verified
Q68: Which of the loop(s) test the condition
Q69: Assume the following variable has been declared
Q70: What is the output of the code
Q71: How many times does the following loop
Q72: Assume the following variable has been declared
Q74: How many times does the following loop
Q75: What is the output of the code
Q76: Which loop does not check a condition
Q77: What is the output of the code
Q78: What is the output of the code
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents