Exercise 21 week 1

524 views
Skip to first unread message

luna1...@gmail.com

unread,
Jul 25, 2015, 10:53:32 PM7/25/15
to mooc.fi
Hi,

I'm having problems with week1 exercise 21.

I'm working on the leapyear problem and I keep getting fifty percent of it incorrect. Could someone please tell me what I'm doing wrong?


Best regards,

Luna


Supported languages are English and Finnish

Please use our build in TMC Pastebin when asking questions related to your code  
 
TMC Plugin has built-in code sharing feature. 
In NetBeans, select TMC -> Send code to TMC pastebin. Copy the link you receive and paste it to your message.  

You may use our web interface to share code snippets: http://paste.mooc.fi

Henrik Nygren

unread,
Jul 27, 2015, 4:33:56 AM7/27/15
to mooc.fi, luna1...@gmail.com
Hello,

If a year is a leap year two conditions have to be true:

* It has to be divisible by 4 and
* It has to either not to be divisible by 100 or it has to be divisible by 400

Think about your conditions in the if-statement and try to update them until it matches those rules. Then the tests will pass too. :)

Hope this helps,
Henrik
Reply all
Reply to author
Forward
Message has been deleted
0 new messages