fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int head = 0;
  5. int tail = 6;
  6. int key = 17;
  7. int Array[] = {7, 12, 6, 5, 11, 10, 13};
  8. while (head < tail) {
  9. head++;
  10. if (Array[head] == key)
  11. printf("%d와 일치", head);
  12. break;
  13. }
  14. if (head == tail) {
  15. printf("일치 요소 없다.");
  16. }
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 9288KB
stdin
Standard input is empty
stdout
Standard output is empty