Advertisement
SergeyPGUTI

8.1.1

Feb 13th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int myStrlen(char a[])
  8. {
  9.     int length=0;
  10.     for (int i=0;a[i]!=0;i++)
  11.     {
  12.         length++;
  13.     }
  14.     return length;
  15. }
  16.  
  17. int main()
  18. {
  19.     char str[] = "1203 123 123 023400   23404040 23 43 sdf 4230040 1234";
  20.     cout<<myStrlen(str);
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement