Well I have been working on loops and I need to count down from 50 to 0 but by counting down by 5s. So 50 45 40 ect. Now I have to use continue or break in this program. I have been fooling around with it but still have no clue on how to have it only display 50 45 40 ect.
This is what I have so far
public class Lab12B {
public static void main(
String[] args) {
for (int num = 50; num >= 0; num--) {
if (num == 0)
continue;
else
System.out.println(num);
}
System.out.println("DONE");
}
}
I keep on wanting to put in num%5 ==0 but all that does is skip every 5.
Well as always thanks in advance
Ian