Quote:
Originally Posted by SickAttack
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]); }
7 (odd)
5 (odd)
1 (odd)
3 (odd)
3 (odd)
8
6
2
4
6
What's the task for, if I may ask?
|
Sorry for double posting, can I get a small explanation of the process ? So I could learn to the future