Add a put_char function so we can print characters ...
This commit is contained in:
@@ -3,9 +3,13 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int put_char(int c) {
|
||||
printf("%c", c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool random_if(int p) {
|
||||
//srand(time(NULL));
|
||||
int r = rand() % 100;
|
||||
//printf("Value of r:%d\n",r);
|
||||
return (r < p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user