PDA

View Full Version : How to check if a certain character follows another


Pastallides
Feb 16, 2014, 11:42 AM
I need to run a program where a person flips a coin an infinite amount of times and is counted, until the program finds heads followed by tails. I've been trying solutions such as allowing h = t + 1 each time, but to no avail.

If there's any way that you can help, it will be greatly appreciated.