/*编写strlen函数*/
#include<stdio.h>
#define N 50
int strlen(char *str)
{
int i=0;
int count=0;
while (str[i] != '\0')
{
count++;
i++;
}
return count;
}
int main()
{
char s[N];
scanf("%s",s);
int result=0;
result = strlen(s);
printf("result=%d\n",result);
return 0;
}
#include<stdio.h>
#define N 50
int strlen(char *str)
{
int i=0;
int count=0;
while (str[i] != '\0')
{
count++;
i++;
}
return count;
}
int main()
{
char s[N];
scanf("%s",s);
int result=0;
result = strlen(s);
printf("result=%d\n",result);
return 0;
}