fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int x, y, z, w, v;
  5. scanf("%d",&v);
  6. for(x=0;x<=9;x++)
  7. {
  8. for(y=0;y<=9;y++)
  9. for(z=0;z<=9;z++)
  10. for(w=0;w<=9;w++)
  11. if((x-y)*z+w==v)
  12. printf("(%d-%d)*%d+%d\n",x,y,z,w);
  13. }
  14.  
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 5276KB
stdin
91
stdout
Standard output is empty