http://www.4shared.com/folder/DGv58BL9/Sistemas_4P.html
---------------------------------------------------------------------------------------------------------------
Função para gerar vetor de 1000 posições com elementos randomicos:
void vetor_aleatorio(int *vet){
int i,r;
system("cls");
srand(time(NULL));
for(i=0; i<MAXT; i++){
r=rand()%MAXT;
printf("%i - %i\n",i,r);
vet[i]=r;
}
printf("\nVETOR GERADO COM SUCESSO\n");
getch();
}
Nenhum comentário:
Postar um comentário