This is the actual output of your program:
Enter how many messages to create
2
Enter 1th Message
Enter 2th Message
Following are messages
1.
2.
Why did you comment out this line?
This way the user has never a chance to enter a message!
If you remove the comment the output will look like this:
Enter how many messages to create
2
Enter 1th Message
hello
Enter 2th Message
world
Following are messages
1. hello
2. world
My recommendation: Learn to use a debugger.
Then you will be able to see what your program is actually doing.