Add new testcase from C source
[oota-llvm.git] / test / combinations.c
1
2
3 void combinations(unsigned int n, unsigned *A) {
4   unsigned int i, t = 1;
5   A[0] = A[n] = 1;
6
7   for (i = 1; i <= n/2; i++) {
8     t = (t * (n+1-i)) / i;
9     A[i] = A[n-i] = t;
10   }
11 }