Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F6953
Fork of P109 Masterwork From Distant Lands
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Aug 21 2015, 10:12
2015-08-21 10:12:57 (UTC+0)
Size
474 B
Referenced Files
None
Subscribers
None
Fork of P109 Masterwork From Distant Lands
View Options
#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;
}
void initialize ()
{
srand((unsigned int)time(NULL));
}
void printRandomValues (int count, int borne_inf, int borne_sup)
{
int i;
for (i = 0 ; i < count ; i++) {
printf("%d\n", aleatoire(borne_inf, borne_sup));
}
}
int main ()
{
initialize()
printRandomValues(10, 1000, 1500);
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6550
Default Alt Text
Fork of P109 Masterwork From Distant Lands (474 B)
Attached To
Mode
P110 random.c - organize the program in units
Attached
Detach File
Event Timeline
Log In to Comment