#include<iostream>
using namespace std;
long DodaiChuoi(char* s);
int main()
{
char s[100];
cout << "Hay nhap chuoi: ";
cin >> s;
int len = DodaiChuoi(s);
cout << len << endl;
return 0;
}
long DodaiChuoi(char* s)
{
int len = 0;
while (*s != NULL)
{
len++;
s++;
}
return len;
}
Không có nhận xét nào:
Đăng nhận xét