1.What is the output produced by following code?
2.What would be the output of the previous code if ">" was replaced by "<"?
3.How would you rewrite the code in the picture using for loop?
yung code po nasa pic paki pindot na lang:):)
paki sagot po please
Answers & Comments
Answer:
1. 5
4
3
2
1
0
2. //Wala, since " 5 less than 0" is false
3. for(int counter = 5; counter >= 0; counter--){
System.out.println(counter);
}