random stuff

This commit is contained in:
Markus Hauschild
2013-06-01 22:36:15 +02:00
parent e4d4c06003
commit dccb0a7e97
3 changed files with 15 additions and 5 deletions

View File

@@ -1,10 +1,11 @@
#include <time.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
bool random_if(int p) {
srand(time(NULL));
//srand(time(NULL));
int r = rand() % 100;
//printf("Value of r:%d\n",r);
return (r < p);
}