webspace hosting reseller hosting|             | blog| forum| dating| free hosting| openhost| report abuse
Internet Fax To Email - Unlimited

Unlimited Faxes, No Fees, Dedicated Phone Number

Free Website Templates
#define ALEATORIOS 10

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>

int main(){
    int vet[ALEATORIOS],aux,num,cont=0;
    bool achou;
    printf("Aleatorios sem repeticao:\n->");
    srand(time(NULL));
    while(cont < ALEATORIOS ) {
                            num = 1 + rand()% ALEATORIOS;
                            for(aux=0;aux< ALEATORIOS;aux++){
                                                    if (num == vet[aux]) { achou = true; }
                                                    }
                                                    if (achou == false) { 
                                                             vet[cont] = num; 
                                                             printf("%d  ",vet[cont]);
                                                             cont++;
                                                             }
                                                    achou = false;
                                                    }
    getch();
    return 0;
}