竖式问题
来源:互联网 发布:淘宝双十一的来源 编辑:程序博客网 时间:2024/05/02 04:31
<span style="font-size:14px;">#include <stdio.h>#include <string.h>int main(){int i,ok,abc,de,x,y,z,count=0;char s[20],buf[99];scanf("%s",s);for(abc=111;abc<=999;abc++)for(de=11;de<=99;de++){x=abc*(de%10);y=abc*(de/10);z=abc*de;sprintf("buf","%d%d%d%d%d",abc,de,x,y,z);ok=1;for(i=0;i<strlen(buf);i++)if(strchr(s,buf[i])==NULL)ok=0; if(ok) { printf("<%d>\n",++count); printf("%5d\nX%4d\n-----\n%5d\n%4d\n-----\n%5d\n\n",abc,de,x,y,z); }}printf("The number of solutions=%d\n",count);return 0;}</span>
注意,scanf("%s",s),s前面没有&符号,因为s已经代表地址
0 0
- 竖式问题
- 【3.3 竖式问题】
- 竖式问题
- 竖式问题
- 竖式问题
- 竖式表达式问题
- 竖式问题
- 竖式问题
- 竖式问题
- 竖式问题
- 竖式问题
- 竖式问题
- 竖式问题
- 竖式求解问题
- C++ 竖式问题
- 竖式问题
- 【看书】竖式问题
- 竖式问题
- recovery PITR 即时恢复
- OCP 1Z0 051 145
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSON
- hbase 表的备份
- Uni2d插件属性介绍
- 竖式问题
- iPad国内降价!在内地开启教育优惠
- 取 <td>里文本
- $(document).ready() 与 windows.onload的区别
- 用互联网创新基因做彩票
- 个人对nandflash驱动的总结(ok6410版)
- 数据库相关小知识[留个笔记]
- 跨域脚本访问总结
- iPhone 6售价首次曝光 5.5寸版价更高