搜索
查看: 226|回复: 0

代码哪里有问题

[复制链接]
 楼主| 发表于 2020-9-1 16:01:16 | 显示全部楼层 |阅读模式
5啊哈币
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main()
  4. {
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. int main()
  8. {
  9. int a, b, c, d, e;
  10. for(a=0; a<=9; a++)
  11. {
  12. for(b=0; b<=9; b++)
  13. {
  14. for(c=0; c<=9; c++)
  15. {
  16. for(d=0; d<=9; d++)
  17. {
  18. for(e=0; e<=9; e++)
  19. {
  20. if( a! =b && a! =c && a! =d && a! =e&& b! =c && b! =d && b! =e&& c! =d && c! =e&& d! =e )
  21. {
  22. if( (a*1000+b*100+c*10+d)*e ==
  23. (d*1000+c*100+b*10+a) )
  24. {
  25. printf("%d%d%d%d", a, b, c, d);
  26. printf("* %d", e);
  27. printf("----");
  28. printf("%d%d%d%d", d, c, b, a);
  29. }
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }
  36. system("pause");
  37.     return 0;
  38. }
复制代码

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表