#include #include #include bool main() { int temp, tabela[30], n = 30; int s = 0, l = n-1; srand((unsigned)time(NULL)); for (int i = 0 ; i < 30 ; i++) { tabela[i] = rand() % 100 + 1; } while(l != s) { if (tabela[s] % 2 != 0) { temp = tabela[s]; tabela[s] = tabela[l]; tabela[l] = temp; l--; if (tabela[s] % 2 == 0) { s++; continue; } } else s++; } for (int i = 0 ; i < 30 ; i++) { printf("%d ", tabela[i]); } }