Create snippet4

Simulates tossing a coin 100 times and stores the result in counter.