Hello to all.
I have this code for my class and I what I am trying to do is decrement the number 39 by two so that odd numbers show, until I get to zero using the "for loop" The issue is that I am suppose to exclude the numbers 33, and 3 when it prints the numbers out. I can't figure that part out, and I can't find it anywhere in the chapter that I had to read on this. Can someone please help me understand how i should do this? This is the code I have so far, but I took out the extra for statements for clarity, beacuse I thought they would help me but they don't.
If I am suppose to use if statements, I don't know how to do this excluding 3 and 33.
import java.util.*;
public class loop
{
public static void main (String[] args)
{
int i;
for (i = 39; i >= 0; i = i - 2)
System.out.print(i + " ");
System.out.println();
}
}