x=10
for(x>0;x-=2)
x--;
x++;
System. out. println("x="+x);
Answers
Answered by
0
Explanation:
wrong for loop where is increment
Answered by
0
Compile time syntax error :
Explanation:
- The above code is written in the java language, which contains the for-loop whose syntax is not correct.
- It is because the concept of for loop states that there must be two semicolons in every for-loop. So the "for(;;)" is also the right syntax of for loop.
- There is no need to define initialization, condition check and the increment for any for loop but there is a need to define two semicolons for any for-loop.
- Hence the above code will give the syntax error.
Learn More :
- for-Loop : https://brainly.in/question/2359999
Similar questions