29.09.2016, 20:18
pawn Код:
new array[] = {7, 2, 5, 1, 3, 8, 6, 3, 4, 6}, count, temp;
for(new i = 0; i < sizeof(array); i ++)
{
if(array[i] % 2)
{
temp = array[count];
array[count ++] = array[i];
array[i] = temp;
}
}
for(new i = 0; i < sizeof(array); i ++)
{
printf("%d", array[i]);
}
5 (odd)
1 (odd)
3 (odd)
3 (odd)
8
6
2
4
6
What's the task for, if I may ask?