fork download
  1. #include <stdio.h>
  2.  
  3.  
  4. c;foo(a,n)int*a;{if(!n)c=0;else{foo(a+1, n-1);!c&&*a&&printf("%d ",*a)||(c+=2*!*a-1,0);};}
  5.  
  6.  
  7.  
  8. int main() {
  9. int x[] = {12,3,0,101,11,1,0,0,14,0,28};
  10. foo(x,sizeof(x)/sizeof(*x));
  11. // your code goes here
  12. return 0;
  13. }
Success #stdin #stdout 0s 4412KB
stdin
Standard input is empty
stdout
28 101 12