[求助]又有问题请教..
下面这个程序为什么我去掉第二个 c=getchar() 就会不断的出现第一个字符..还有就是getchar() 不是只能输入一个字符吗?为什么可以输入字符串..看不出跟循环结构有什么关系噢..!
再次谢谢高手们了..
#include <stdio.h>
main()
{
int c;
c=getchar();
while(c!='\n')
{
putchar(c);
c=getchar();
}
}
2007-01-21 16:43
2007-01-21 17:00
2007-01-21 17:16
2007-01-21 17:49
2007-01-21 20:10
[此贴子已经被作者于2007-1-22 15:49:08编辑过]

2007-01-22 09:16
2007-01-22 15:01