convert the following segment into equivalent for loop:
int i=10; [5]
while(i<=20){
System.out.print(i+” “);
i++;}
Answers
Answered by
3
Answer:
Convert the following segment into equivalent for loop { int i, 1=0; while (i<=20) System.out.print (i+“”); 1++; }
Top answer · 1 vote
After converting the while loop into for : for(int i=0; i<=20; i++) { System.out.print(i+“
Answered by
2
Question:
Convert the following segment into equivalent for loop:
int i = 0;
while(i <= 20) {
System.out.print (i + " ");
i++;
}
Solution:
int i;
for(i=0;i<=20;i++)
{
System.out.print(i+" ");
}
Similar questions
English,
3 months ago
Science,
7 months ago
English,
11 months ago
Math,
11 months ago
Social Sciences,
11 months ago