JAVA:
Replace the for loop below with a code using the "While" loop:
int s = 0;
int c = 0;
boolean valid = true;
for(int i = 4; i <= 20="" ||="" valid;="" i="i+2)">=>
if(i%4 != 0) {
s = s + i;
c++;
}
if(i > 20) {
valid = false;
System.out.println(s / c);
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here