PROGRAMMING:Calculate string length
Input a string from the keyboard, calculate the actual number of characters and output. Do not use the string processing function strlen (), programming to achieve the function of strlen.
###Function interface:
`unsigned int MyStrlen(const char str[])`
###Example of main function
```
#include
unsigned int MyStrlen(const char str[]);
int main()
{
char a[80]; unsigned int len;
gets(a);
len=MyStrlen(a);
printf("%u\n", len);
return 0;
}
/*The mystrlen function is implemented here*/
```
###Input format:
Enter a string to end with a carriage return.
###Output format:
Output string length
###Input example:
```in
hello world!
```
###Output example:
```out
twelve
```
answer:If there is no answer, please comment
###Function interface:
`unsigned int MyStrlen(const char str[])`
###Example of main function
```
#include
unsigned int MyStrlen(const char str[]);
int main()
{
char a[80]; unsigned int len;
gets(a);
len=MyStrlen(a);
printf("%u\n", len);
return 0;
}
/*The mystrlen function is implemented here*/
```
###Input format:
Enter a string to end with a carriage return.
###Output format:
Output string length
###Input example:
```in
hello world!
```
###Output example:
```out
twelve
```
answer:If there is no answer, please comment