#include <stdio.h>
int main() {
int arr[10] = {-1, 0, 5, -9, 8, -3, 5, 0, -7, 4};
int tmp = 0;
for(int i = 0; i < 9; ++i) {
for(int j = 0; j < 9; ++j) {
if(arr[j] < 1) {
tmp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = tmp;
}
if(arr[j] < 0) {
tmp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = tmp;
}
}
}
for(int i = 0; i < 10; ++i) printf("%d%c", arr[i], ' ');
return 0;
}