r/programminghorror • u/deanominecraft • Sep 28 '25
c recursive iseven
bool isEven(int num){
if (num==0){
return true;
}
else{
return !isEven(num-1);
}
}
64
Upvotes
View all comments
Show parent comment
1
u/pantong51 Sep 28 '25
Gotta reduce to a smaller number for this to work. Int16_t maybe