The following code has error(s). Rewrite the correct code underlining all the corrections made :

The following code has error(s). Rewrite the correct code underlining all the corrections made :int n=5 int i=l . f=l ; do ;{f =f*i ; i + + ;while (i<=n)jTextFieldl.setText(" "+f) ;

Answers

int n = 5; int i = 1; int f = 1; do { f = f * i; i++; } while (i <= n); jTextField1.setText(" " + f); The code has been corrected to include semicolons; to close loops; and to set the int values of n, i, and f correctly.

Answered by hernandezhenry

We have mentors from

Contact support