id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

whichOlympics


Summer olympics are held on years that are divisible by 4. Winter olympics are held on the other even years. No olympics are held on the odd years. Given a year, return which olympics will be held that year, either "winter", "summer", or "none".


whichOlympics(2014) → "winter"
whichOlympics(2016) → "summer"
whichOlympics(2015) → "none"

...Save, Compile, Run (ctrl-enter)

String whichOlympics(int year) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy