Yes it is sometimes difficult to say the program without any writing aid.

What I can suggest is you have to do the pseudo understanding of the number of variables you need, the purpose of the program, which looping commands to use, etc.

For example: Using the simple most example of printing Hello Word,

1) No Variables to be used
2) Header to give System the IO output using cout
3) Function...