Saludos!!
Código
#include<stdio.h> #include<stdlib.h> #include<time.h> #define SIZE 20 void generarRandom(int [], int); void ordenarVector(int [], int); void mostrarVector(int [], int); main() { int vector[SIZE] = {0}; generarRandom(vector, SIZE); ordenarVector(vector, SIZE); mostrarVector(vector, SIZE); return 0; } void generarRandom(int v[], int size) { int i, j, num, dupl; for (i = 0; i < size; i++){ dupl = 0; for (j = 0; j <= i; j++){ if (num == v[j]){ dupl = 1; break; } } if (dupl == 1) i--; else v[i] = num; } } void ordenarVector(int v[], int size) { int i, j, temp; for (i = 0; i < size - 1; i++){ for (j = i+1; j < size; j++){ if (v[i] > v[j]){ temp = v[i]; v[i] = v[j]; v[j] = temp; } } } } void mostrarVector(int v[], int size) { int i; for (i = 0; i < size; i++) }