Before you begin coding, you must understand the problem. You need to break it down sufficiently in your mind so that you can tackle the program, especially when you are dealing with many different problems all in one program.
Once you understand what is needed, you must ensure you understand HOW to perform the kinds of calculations or manipulations necessary to get the correct solution.
This is usually done by writing an algorithm. Your algorithm is generally written in pseudo-code; some statements may be code, other statements may be English phrases, but it is precise and each and every step is indicated.
Your algorithm may begin as just a list of variables that you need. From there it progresses and grows until you have a complete list of instructions that are required to solve the problem!
After you have a complete algorithm, you can transform your pseudocode into whichever programming language you choose. In these examples, we are using C++ (see C++ Syntax).
You are visitor # .