#include <stdio.h>
#include <math.h>
void main()
{
int x,i,j,k=0,a,m,n,w=0;
printf("Please put in a dight(0<x)\n");
scanf("%d",&x);
printf("--------------------------------------------------------------\n");
for(i=1;i<(sqrt(2*x))/2;i++)
{m=2*i;n=2*i+1;
if(x%m==i)
{a=x/m;k=i;
for(j=0;j<m-1;j++,k--)
printf("%d+",a-k+1);
printf("%d=%d",a-k+1,x);
printf("\n");w++;
}
if(x%n==0&&(x/n-i))
{a=x/n;k=i;
for(j=0;j<n-1;j++,k--)
printf("%d+",a-k);
printf("%d=%d",a-k,x);
printf("\n");w++;
}
}
if(!w)printf("Sorry not exist those dight!\n");
printf("---------------------------------------------------------------\n");
printf("exist %d cases.\n",w);
getchar();
getchar();
}