/* * Gets a user integer greater than a specified value * @param int val * - The value that the user input is to be greater than */ int get_user_greater_int(int val) { int input, noc; printf("Enter an Interger Greater than %d: ", val); noc = scanf("%d", &input); clear_keyboard_buffer(); while (noc != 1 || !(input >= 0)) { printf("Invalid input\nEnter an Interger Greater than %d", val); noc = scanf("%d", &input); clear_keyboard_buffer(); } return input; }