Ad
Code
Diff
  • int nbDaysInMonth(int n, bool m) {  
    	return n>7?31-n%2:n==2?31-3+m:31-1+n%2; //lets introduce some obfuscation:)
    }
    • int nbDaysInMonth(int n, bool m) {
    • return n == 2 ? 28 + m : 30 + (n + (n > 7) & 1);
    • int nbDaysInMonth(int n, bool m) {
    • return n>7?31-n%2:n==2?31-3+m:31-1+n%2; //lets introduce some obfuscation:)
    • }