// sort algorithm example
#include <iostream>
#include <algorithm>

using namespace std;

bool compare(int a, int b) {
	return (a > b); 
}

int main () {
	int x[] = {2, 4, 1, 7, 8, 0, 9};
	sort(x, x + sizeof(x) / sizeof(int), compare);
	for (int y: x) cout << ' ' << y;
}