首页 新闻 会员 周边

程序改错 怎么破

0
悬赏园豆:10 [待解决问题]

include <stdio.h>

include <conio.h>

void main()
{
int i;
char ch;
while(ch=getch()!='\0')
{
i++;
printf("%c",ch);
}
printf("you type %d characters\n",i);
}

阿兵010的主页 阿兵010 | 初学一级 | 园豆:192
提问于:2021-07-03 13:25
< >
分享
所有回答(1)
0
#include <stdio.h>
#include <conio.h>

int main()
{
	int i = 0;
	char ch;
	while (ch = _getch() != '\0')
	{
		i++;
		printf("%c", ch);
	}
	printf("you type %d characters\n", i);
}
Micro丶Organism | 园豆:205 (菜鸟二级) | 2021-07-03 14:01
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册