Check if the number is in the table or not
#include <stdio.h>
int main(void) {
int i,n,x,y,t[50];
printf("How long do you want your table? :");
scanf("%d",&n);
for (i=0;i<n;i++){
printf("enter the %d number :",i+1);
scanf("%d",&t[i]);
}
printf("enter the number for verify :");
scanf("%d",&x);
y=0;
for (i=0;i<n;i++){
if (t[i]==x)
y++;
}
if (y==1){
printf("The number is in the table");
}
else {
printf("the number is not in the table");
}
return 0;
}