#include <stdio.h>

int main() {
    int num[10],odd=0,even=9;
    int new_num[10];
    for (int i=0; i<10; i++) {
        scanf("%d",&num[i]);
        if (num[i]%2!=0) {
            new_num[odd]=num[i];
            odd++;
        }
        else {
            new_num[even]=num[i];
            even--;
        }
    }
    for (int i=0; i<10; i++) {
        printf("%d ",new_num[i]);
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: