My issue
what’s the problem
My code
#include <stdio.h>
int main() {
int N,X;
sacnf("%d %d",&N,&X);
int array[N];
for (int i= 0; i < N; i++){
scanf("%d", &array[i]);
}
for (int i = 0; i < N; i++){
if(array[i]==X){
found = 1;
break;
}
}
if (found ){
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-dsa-c/MUJDSAC06/problems/SEARCHINARR