All pastes #966576 Raw Edit

smoke

public c v1 · immutable
·published 2008-04-01 20:56 UTC
rendered paste body
#include <stdio.h>#include <time.h>#include <stdlib.h>bool main(){	int n = 30, s = 0, l = n-1;        int temp;        int tabela[30];	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]); }}