Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //generando numeros aleatorios con semilla
- #include <stdio.h>
- #include <time.h>
- int main(int argi,char** args){
- int iterador=0;
- int x=0;
- int semilla;
- srand(time(NULL)); /* time(null) nos dara el tiempo transcurrido en segundos
- desde epoch.
- */
- for(iterador = 0; iterador < 10; iterador++){
- x = (rand()%20+10);
- printf("Aqui esta el %d numero del random: %d \n",iterador,x);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement