1.

Rewrite the following code using WHILE loop:int x=100;for(int i=2;i<=22;i=i+4){jTextArea1.append("\n"+(i+x));x=x-2;}

Answer»

int x=100,i=2;

while(i<=22)

{

jTextArea1.append("\n"+(i+x));

x=x-2;

=i+4;

}



Discussion

No Comment Found

Related InterviewSolutions