Ejemplo n.º 1
0
int main(int argc, char *argv[]){

    CONJUNTO *conj = NULL, *conj_unicos;

    if (conj == NULL)
        conj = receber_conjunto();

    conj_unicos = elemento_unico(conj);
    printf ("Elemento(s) unico(s): \n");
    exibir_conjunto(conj_unicos);
    liberar_conj(conj_unicos);
    return 0;
}
Ejemplo n.º 2
0
int main(){
    int n,i;
    int *vet;
    // Receber Tamanho do Vetor
    scanf("%d",&n);
    //Alocar memoria para o vetor
    vet = (int*)malloc(n*sizeof(int));
    // Receber os n valores
    for(i=0;i<n;i++){
        scanf("%d",&vet[i]);
    }
    // Executar a funçao
    elemento_unico(n, vet);
    // Liberar a memória
    free(vet);
    return 0;
}