Oct 8, 2012 at 5:28pm
If all you are doing is displaying, you don't need to return anything.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
double void myFunction(double randomizer, double selection)
{
for(int i=1; i<=12; i++) //12 iterations starting from 1
{
randomizer = rand() % 2;
if (randomizer == 0)
{
selection += ( selection == 8 ) ? -0.5 : 0.5;
}
else
{
selection += ( selection == 0 ) ? 0.5 : -0.5;
}
cout << selection << endl; //print out the 12 iterations
}
}
|
Last edited on Oct 8, 2012 at 5:28pm