What is the problem ? The pseudo code is as it should be. You only have to replace it with actual statements.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
What have you got so far ? A normal windows application or a console application ?
If you have the former, then you can put a label, button and editbox on a form and start from there.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874
Turbomen, do what you can, paste the code in, tell us what doesnt work or what error you get and we'll try and help you. Doing homework for you isnt going to happen
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
No code tags?
Whats the error? symptom?
other than youve said pick is a char, and then asked if its 'flip1' as a string, so i guess it always says you lose.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
What is the purpose of the integers Head and tail? Are they needed? Look at how you are using them and follow the value of Flip1 using debug monitors.
jsosnowski
Junior Poster in Training
68 posts since Nov 2007
Reputation Points: 11
Solved Threads: 11
Now that you have a program that works, consider this: One goal for writing code is to avoid duplication. Note that you have the same code repeating for each case (H or T). You might want to look for a way to eliminate the duplication. Consider moving some of the duplicate code above the case statement.
jsosnowski
Junior Poster in Training
68 posts since Nov 2007
Reputation Points: 11
Solved Threads: 11