turbo c语言教程(Turbo C language tutorial)
turbo c语言教程(Turbo C language tutorial)
Turbo, a basic C programming steps
The program design method consists of three basic steps:
The first step: analysis of the problem.
The second step: to draw the outline of the program.
The third step: the implementation of the program.
3a. programming
3b. testing and debugging program
3C. provides data print results
Here, we explain the details of each step.
The first step: analysis of the problem
In this step, you must:
A. as a solution to the problem, determined to generate data (output). As a sub step
A part, you should define the output variables.
B. determine the output data (called input), as a part of this step, you should define
Input variables.
C. developed an algorithm to obtain the output from the input in finite steps. This algorithm is defined as structured
The order of operations, so as to solve the problem in finite steps. Digital issues, including the algorithm gets the output
In the calculation, but for non numeric problems, this algorithm includes many text and image processing operations.
The second step: to draw the outline of the program
In this step, you must use some sentences (pseudo code) to draw the outline of the program. Corresponding to each sentence
A simple procedure. For a simple procedure, by listing the program execution sequence of action,
Can directly generate pseudo code. However, for some complex procedures, you will need the general process organized
To organize. In this regard, should be designed with the top-down method.
When using the top-down design method, you need to split up into several segments to complete the program. List each paragraph
To achieve the task, the program will have a profile, this called main module. When a task is listed in the main module,
Only to be identified by its name, not pointed out how the job will be done. The contents of this program for design
The next stage to discuss. The program is divided into several tasks is the preliminary design of the program