Advertisement
JosepRivaille

P95401: Funció per als anys de traspàs

Mar 14th, 2015
1,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. //Retorna true si es any de traspàs
  2. bool es_any_de_traspas(int any) {
  3.     if (any%4 == 0 && any%100 != 0) return true;
  4.     else if (any%100 == 0 && (any/100)%4 == 0) return true;
  5.     else return false;
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement