Page MenuHomeDevCentral
Paste P109

random.c - issue fixed
ActivePublic

Authored by dereckson on Aug 21 2015, 10:09.
Tags
None
Referenced Files
F6952: Masterwork From Distant Lands
Aug 21 2015, 10:09
Subscribers
None
#include <stdio.h>
#include <stdlib.h>
int aleatoire(int borne_1, int borne_2)
{
int nombre;
nombre = rand() % ((borne_2 - borne_1) + 1) + borne_1;
return nombre;
}
int main()
{
srand((unsigned int)time(NULL));
int i;
for (i = 0 ; i < 10 ; i++) {
printf("%d\n", aleatoire(1000, 1500));
}
}

Event Timeline

dereckson changed the title of this paste from untitled to Masterwork From Distant Lands.
dereckson updated the paste's language from autodetect to .
dereckson changed the title of this paste from Masterwork From Distant Lands to random.c - issue fixed.Aug 21 2015, 10:18