Your main signature is wrong. It should be:
Code:
int main()
Code:
int main(int argc, char** argv)
Don't use system("pause"), seePause Before Exiting a Console Application

Use code tags to post code.

So check the length of user input, read the user input as a string. Then you can count the number of characters and convert it to an int.