Basically you'd use two variables representingthe current maximum and minimum, initialize them appropriately and compare each vectort element to them, e.g.

#include <limits.h>

int min = INT_MAX;

int max = INT_MIN;

// ...

Now, if your current user_num[i] is larger than the current 'max', replace 'max' with 'user_num[i]' and use the same method for 'min'.