Thread: % problem
View Single Post
Old Oct 4th, 2005, 9:58 PM   #4
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 381
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
class year{
	public static void main(String [] args){
		
		for(int i = 0 ; i <= 2005 ; i++)
			if((i%15 == 0) || (i%100 == 0) || (i == 2005) ){
				System.out.println(i);
			}
	}
}

This works , so there has to be something else wrong with your code.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote