scanf函数的用法
2014-02-20 19:07
295 查看
#include <stdio.h> main() { char ch,nch; /* */ int count; /* */ int k; /* */ printf("Please input a string with a # in the end.\n"); scanf("%c",&ch); /* */ while(ch != '#') /* */ { if(ch >= '0' && ch <= '9') { /* */ count = ch-'0'+1; /* */ scanf("%c",&nch); /* */ for(k=0;k<count;k++) /* */ printf("%c",nch); } else printf("%c",ch); /* */ printf(" "); /* */ scanf("%c",&ch); /* */ } printf("#\n"); /* */ }scanf("%c",&nch); 这一句scanf函数怎么运行的 他还是要手动输入字符进去吗?
相关文章推荐
- scanf()函数用法小结
- scanf和sprintf函数用法总结
- scanf 函数的 用法 以及陷阱
- C语言中关于scanf函数的用法
- C语言Scanf函数特殊用法
- scanf()函数的用法和实践
- scanf, sscanf 函数用法 (原创)
- sscanf / sprintf 函数和 snprintf 函数的用法
- scanf()函数的用法和实践
- C语言scanf函数用法详细解释
- scanf()函数中%[]格式控制符用法
- C语言中关于scanf函数的用法
- scanf, sscanf 函数用法
- scanf()函数用法小结(转载)
- Scanf系列函数的高级用法
- scanf()函数用法小结
- scanf()函数的用法和实践
- scanf()函数用法小结(转载)
- scanf()函数的用法和实践
- scanf函数用法