fork download
  1. #include<iostream>
  2. #include<cstdio>
  3. using namespace std;
  4. int Length(string s)
  5. {
  6. int len=0;
  7. for(int i=0;s[i]!='\0';i++)
  8. {
  9. len++;
  10. }
  11. return len;
  12. }
  13. int main()
  14. {
  15. string s;
  16. cin>>s;
  17. cout<<Length(s);
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5284KB
stdin
jhuma1& gh
stdout
7