#include
int main()
{
int n=0;
printf("请输入字符串,输入后回车:\n");
while(getchar()!='\n')
{
n++;
}
printf("字符个数为:%d\n", n);
return 0;
}
#include
int main()
{
int n=0;
printf("请输入字符串,输入后回车:\n");
while(getchar()!='\n')
{
n++;
}
printf("字符个数为:%d\n", n);
return 0;
}