ok guys here is the code im having problems with:

int nKeep = 1;
int var=0;
while(nKeep ==1)
{

if (var== 0)
{
var++;
}
else if (var>0&&var<3)
{
var++;
}
else if (var == 3 && var>0)
{
var--;
}

what im trying to get it to do is increase var uptill 10 and then when var
gets to 10 it decreases back to zero and then when it hits zero it starts
to increase back to 10 again. Thanks in advance......NANOSAURUS