01: #include <stdio.h>
02: #include <time.h>
03: #include <stdlib.h>
04:
05: void toss(void);
06:
07: int main(void)
08: {
09: srand((unsigned)time(NULL));
10: toss();
11: return 0;
12: }
13:
14: void toss(void)
15: {
16: int r;
17: r = rand() % 2;
18: if(r % 2 == 0) printf("H");
19: else printf("T");
20: }