Click to See Complete Forum and Search --> : please help with this stupid assignment


leospyder
03-30-2006, 02:13 AM
coin

leospyder
03-30-2006, 10:44 AM
can anyone help?

anubis
03-30-2006, 05:58 PM
use this code to determine the maximum number of times in a row heads showed up:


if(myCoin.toString().equals("Heads"))
{
currentRun++;

if(currentRun > maxRun)
maxRun = currentRun;
}
else
{
currentRun = 0;
}

and the just output maxRun after your for loop. is that all you needed help with?