Advertisement
Felanpro

Input string size

Dec 5th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string stringSize;
  8.  
  9.     cout << "word: ";
  10.     cin >> stringSize;
  11.  
  12.     cout << stringSize.size() << endl;
  13.  
  14.     system("pause");
  15.    
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement