Write expression inside Ternary operator
#include <stdio.h> #include <stdlib.h> #include <conio.h> int main(void) { while(!kbhit()) rand(); rand() % 2 ? printf("H") : printf("T"); return 0; }