Add a put_char function so we can print characters ...

This commit is contained in:
Markus Hauschild
2013-06-02 01:17:57 +02:00
parent 1ed3c1fe26
commit fd3ade68df
2 changed files with 11 additions and 3 deletions

View File

@@ -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);
}