fork download
  1. #include <stdio.h>
  2.  
  3. int arr[4];
  4.  
  5. bool in_array(int a) {
  6. for(int i = 0; i <= 4; i++)
  7. if (arr[i] == a)
  8. return true;
  9. return false;
  10. }
  11.  
  12. int main() {
  13. for(int i = 0; i < 23; i++)
  14. printf("%d\n", in_array(i));
  15. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1