Computer Science, asked by Nabeela6647, 3 months ago

the program must accept a list of integers and an integer X as the input. The program must print YES if X is present in the given list of integers. Else the program must print NO as the output (python)

Answers

Answered by gopi21137ec
0

Answer:

int main()

{

int N;

scanf("%d", &N);

int value, numbercount[1001]=0;

for(int ctr = 1; ctr <= N; ctr+1) {

scanf("%d", value);

if(numbercount[value]++ !=1){

printf("NO");

break;

}

}

printf("YES");

return 0;

}

Similar questions