fork(2) download
  1. #include <stdio.h>
  2.  
  3. int f(char*s){return s[1]?(s[0]-s[1])%2?f(s+1):0:1;}
  4.  
  5. int main() {
  6. printf("%d\n",f("#define"));
  7. printf("%d\n",f("EvenSt-ring$!"));
  8. printf("%d\n",f("~"));
  9. printf("%d\n",f("C ode - g ol!f"));
  10.  
  11. printf("%d\n",f("Hello World"));
  12. printf("%d\n",f("3.1415"));
  13. printf("%d\n",f("Code-golf"));
  14. printf("%d\n",f("Shortest answer in bytes wins"));
  15. return 0;
  16. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
1
1
1
1
0
0
0
0