int* iNum[65535];
int iPos = 0;
void doWork(int iSum, int iNow)
{
int iStart = iNow;
iNum[iPos ++] = &iStart;
while(iSum - iStart > iStart)
{
doWork(iSum - iStart, iStart + 1);
for (int i=0; i<iPos; i++)
{
printf("%d + ", *iNum[i]);
}
printf("%d\n", iSum - iStart);
iStart ++;
}
iPos --;
}
int _tmain(int argc, _TCHAR* argv[])
{
char s[20] = {0};
scanf("%s", s);
int num = atoi(s);
doWork(num, 1);
getchar();
getchar();
return 0;
return 0;
}