Add explicit curly braces to single-line statements
Rewrite rand_in_range
Use putchar instead of puts