c语言新手求助
查看原帖
c语言新手求助
1111227
Akiraku楼主2023/11/12 20:49

请问怎么操作才能停止输入 输出结果呀 我的代码:

#include<stdio.h>
#include<string.h>
int main()
{
	char string[8];
	int cnt=0;
	while (scanf("%s",string)){
		for (int i=0;string[i]!='\0';i++){
			cnt++;
		}
	}
	return 0;
}
2023/11/12 20:49
加载中...