This forum is for C and C++.
What you've posted seems to be visual basic.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
I agree. Are they really teaching LET for VB? Or is this another version of BASIC? Maybe best in Legacy and Other Languages
DO WHILE count < flipq
LET num=INT(RND(0)*2)+1
IF num = 1 THEN
PRINT "T"
'LET count = count + 1 ' put this before the IF
'LET tcount = tcount + 1 ' uncomment this and duplicate it for heads
'LET maxtcount = tcount
'IF maxtcount > tcount THEN
'LET maxtcount = maxtcount
'END IF
ELSE
PRINT "H"
END IF
LOOP
Initializetcount and hcount before the while loop.
WaltP
Posting Sage w/ dash of thyme
10,492 posts since May 2006
Reputation Points: 3,348
Solved Threads: 943