I am trying to make this program run until 5 valid numbers are entered, but it stips after only 5 numbers are entered (whether they are valid or not)

Please help

Code:#include <stdio.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 #define SIZE 5 //prototype int isValid(int); int isUnique(int[], int, int); main(){ int values [SIZE]={0}; int count; int i; int valid; int result; int validSoFar; int unique; int uniqueSoFar; int number; count=0; result=0; i=0; validSoFar=0; uniqueSoFar=0; for (i=0; i<SIZE; i++){ printf("Enter an integer (50-100):\n"); scanf("%i",&number); valid =isValid(number); if(valid){ unique=isUnique(values,SIZE, number); if (unique){ values[uniqueSoFar]=number; uniqueSoFar++; } validSoFar++; } //validSoFar+=valid; //uniqueSoFar+=unique; printf("so far valid %i\n",validSoFar); printf("Unique so far %i\n",uniqueSoFar); } system("pause"); } int isValid(int input){ int result; int i; if (input>=50 && input <=100) result= TRUE; else result= FALSE; return result; } int isUnique(int values[],int size,int number) { int result=TRUE; int i; for(i=0; i<size;i++){ if (number==values[i]) result=FALSE; return result; } }