I started learning Java about a week ago and I'm doing some loops nowI wrote a class that counts up to 25 and displays the numbers. I changed a few things here and there to see what would happen
now I want to display the numbers in .5 increments. Here is my code and I'm not sure quite what to do, is there a tutorial i can do to learn how?
public class NewLoopTest { public static void main (String[] args) { for (int i=0;i<=25;i++) { if ((i%.5)== 0) //((i%5)!= 0)when i is divisible by 5 the number will not be shown //((i%5)== 0)all numbers divisible by 5 will be shown //((i%5)== 1)count will start at 1 and add 5 @ each increment, these will be shown //((i%5)== .5) ?? { System.out.println(i); } } }