I need to turn this code into a case switch statement. Tried several times to change it but no luck. Anybody can help and point me to the right direction?
Code:int leap (int year) { int leapyer; if ((year%4==0) && (year%100!=0) || (year%400==0)) leapyer=366; else leapyer=365; return leapyer; }