17 lines
334 B
C
17 lines
334 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main(int argc, char const argv[])
|
||
|
{
|
||
|
FILE *flux;
|
||
|
int temp=0;
|
||
|
flux = fopen("/dev/random", "r");
|
||
|
if(flux)
|
||
|
{
|
||
|
fread(&temp,sizeof(int),1,flux);
|
||
|
printf("%d\n", temp%6);
|
||
|
fclose(flux);
|
||
|
}
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|