#include void printArray(int[], int); int checkValid(int[], int); void printArray(int array[], int size) { int i; printf("Array: "); for (i=0; i<=size; i++) { printf("%d ", array[i]); } printf("\n"); } int checkValid(int array[], int pos) { int i = 0; if (array[pos] < 10 || array[pos] > 100) { printf("Integer Range [10-100]!!\n"); return 0; } while (i < pos) { if (array[pos] == array[i]) { printf("Duplicated Value!!\n"); return 0; } i++; } return 1; } int main() { int array[20]; int i; int pos = 0; // store the current position while (pos < 20) { do{ printf("%d of 20:", pos+1); scanf("%d", &array[pos]); }while(!checkValid(array, pos)); printArray(array, pos); pos++; } }