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?
|
I want to be a scripter in a server I like to play in, and it's some sort of a test that the programmer gave me to be an assistant scripter.
Thanks for the help.