C++中输入几个字母,输出这几个字母,怎么编程,我的怎么只能输出一个字母?

日期:2013-11-08 14:53:36 人气:1

C++中输入几个字母,输出这几个字母,怎么编程,我的怎么只能输出一个字母?

在VC6.0下编译通过。 #include #include /* 函数说明:输入整数 功能说明:num为输入位数,输入数放入n中 */ void scanfnum(int *n,int num) { char ch; *n=0; for(int i=0;i<num;i++) { ch=getch()(); while(ch'9') ch=getch()(); putch(ch); (*n)=(*n)*10
    A+
热门评论