+ 2
Rewrite using for loop and do while loop in java
int I=1, j=2; while (I<=25) { I++; j=j+2; }
4 Answers
+ 2
int i=1,j=2;
do
{
i++;
j+=2;
}while(i<=25);
+ 3
int i=1,j=2;
for(i;i<=25;++i)
{
j+=2;
}
+ 1
int i=1, j=2;
for( ;i<=25; i++, j+=2);
0
int j = 2;
int end = 25;
j += 2 * (end + 1);