Know your purpose
Program development required five essential steps. The first step in developing a program is to define the problem "what want to do for which we are creating a program". This definition must include the needed output, the available input and a brief definition that how we can transform the available input into the required output. The second step is to define" how the problem is to be solved".
This detailed definition is an algorithm. In fact, algorithm is a step by step procedure for solving problem. If a person has difficulty in learning to write a program, the difficulty usually lies in developing a good algorithm. Flowchart is a pictorial representation of a step by step algorithm for a problem.
The third step and main step in developing a program is to code the program. In coding we translate the logic of the algorithm into a programming language. The fourth step is test the program to be sure that it is working correctly. In testing a program, generally two types of errors are experienced; Syntax resting and logical testing. Final step is preparing documentation for the program. Documentation is extremely important and includes explanation of logic of the program and information about the input and the outputs.