为什么会一直输入不会停止

img

img

不同编译器不一样 试试ctrl+z或者d之类的

EOF这个终止符你是怎么输入的?

EOF
Windows、DoS系统:Ctrl+Z
Linux系统:Ctrl+D

scanf()的返回值为输入的个数,”On success, the function returns the number of items of the argument list successfully filled. “,while(scanf()!=EOF)恒成立

有个while循环,一直循环输入/。