Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

leap year without date objects

807599Feb 24 2007 — edited Feb 26 2007
I need to check to see how many leap years are between two user-inputted years and I can't use date objects. I figure I need to start with a for loop, but I get lost when to by the mod 4, mod 100, or mod 400. Any help?
for(int l=cYear; l <= eYear; l++){
				if(l%4 == 0){
					if(l%100 == 0){
						
					}
				}
				
			}
also, if anyone is bored and really wants to give of themselves, I could use some more help with a pretty challenging-for-my-level program. Let me know.

Message was edited by:
kaluga
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2007
Added on Feb 24 2007
28 comments
308 views