Language: C

int main()
{
	int n;
	while (scanf("%d", &n), n)
	{
		int b[31];
		memset(b, 0, sizeof(b));
		b[0] = n;
		while (true)
		{
			int t = find(b, b+n, 0) - b;
			for (int i = 0; i < t-1; ++i)
				printf("%d ", b[i]);
			printf("%d\n", b[t-1]);

			if (t == n)
				break;

			int u;
			u = t-1;
			while (b[u] == 1)
				--u;
			--b[u];
			++u;
			fill(b+u, b+n, 0);
			int s = t - u + 1;
			while (s--)
			{
				if (b[u] == b[u-1])
					++u;
				++b[u];
			}
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:4:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         while (scanf("%d", &n), n)
      |                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:4:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         while (scanf("%d", &n), n)
      |                ^~~~~
main.c:4:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:17: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
    7 |                 memset(b, 0, sizeof(b));
      |                 ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'memset'
  +++ |+#include <string.h>
    1 | int main()
main.c:7:17: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
    7 |                 memset(b, 0, sizeof(b));
      |                 ^~~~~~
main.c:7:17: note: include '<string.h>' or provide a declaration of 'memset'
main.c:9:24: error: 'true' undeclared (first use in this function)
    9 |                 while (true)
      |                        ^~~~
main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | int main()
main.c:9:24: note: each undeclared identifier is reported only once for each function it appears in
    9 |                 while (true)
      |                        ^~~~
main.c:11:33: error: implicit declaration of function 'find' [-Wimplicit-function-declaration]
   11 |                         int t = find(b, b+n, 0) - b;
      |                                 ^~~~
main.c:11:49: error: invalid operands to binary - (have 'int' and 'int *')
   11 |                         int t = find(b, b+n, 0) - b;
      |                                 ~~~~~~~~~~~~~~~ ^
      |                                 |               |
      |                                 int             int *
main.c:13:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |                                 printf("%d ", b[i]);
      |                                 ^~~~~~
main.c:13:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 |                         printf("%d\n", b[t-1]);
      |                         ^~~~~~
main.c:14:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:25: error: implicit declaration of function 'fill' [-Wimplicit-function-declaration]
   25 |                         fill(b+u, b+n, 0);
      |                         ^~~~