check repetitions

i would like to know how to check repetitions in this code:

1
2
3
4
5
6
7
8
9
for (i=0; i<5; i++)
	{
		do{
			SetConsoleTextAttribute( h , K+10 );
			printf("\nWich is the %d number? ", i+1);
			scanf_s(" %d", &number[i]);
			j++;
		}while((number[j]==number[i])||(number[i]<1)||(number[i]>50));
	}


and when there is repetitions it would ask for a number again
can someone explain how to do this?
thanks
Topic archived. No new replies allowed.