Code:
int i,j, found;
for(i=0;i<20;i++)
{
    if(array[i] == 1)
    {
        found = 1;
        break;
    }
}

if(found)
{
    for(j=0;j<20;j++)
    {
        if(j != i)
            array[j] = 0;
    }
}



So in etwa sollte es gehen.

Last edited by LemmyTheSlayer; 06/02/12 18:39.

SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE SCHLEIFE