Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- main( )
- {
- unsigned long num[1];
- unsigned long cantidad,contador;
- unsigned long hora = time(NULL);
- srand(hora);
- printf("Ingrese la cantidad de numeros aleatorios que desea generar\n");
- scanf("%lu",&cantidad);
- for(contador = 0; contador<cantidad; contador++)
- {
- num[cantidad] = rand()%(2);
- printf("%lu\n", num[cantidad]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement