#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int MyStrlen1(char* s)
{
int count = 0;
while (*s != '\0')
{
s++;
count++;
}
return count;
}
int MyStrlen2(char* s)
{
if (*s == '\0')
{
return 0;
}
else
{
return 1 + MyStrlen2(s + 1);
}
}
size_t MyStrlen3(const char* s)
{
size_t count = 0;
while (*s != '\0')
{
s++;
count++;
}
return count;
}
size_t MyStrlen4(const char* s)
{
const char* t = s;
while (*s++);
return s - t - 1;
}
int main()
{
int ret = 0;
char str[30] = { 0 };
scanf("%s", str);
printf("%d\n", MyStrlen1(str));
printf("%d\n", MyStrlen2(str));
printf("%d\n", MyStrlen3(str));
printf("%d\n", MyStrlen4(str));
return 0;
}