#include<stdio.h>
void main()
{
int i,n;
char s[20];
printf("input a string:");
i=0;
while((s[i]=getchar())!='/n')
i++;
s[i]='/o';
for(i=0;s[i]!='/o';i++)
if(s[i]!='.')
n++;
if(n!=0)
printf("The length is %d /n",n+1);
else
printf("Empty/n");
}
为什么有问题?