程序编写过程
编写程序所需的步骤可以定义为 -
- 用户要求
- 问题分析
- Input and Output
- Designing Algorithm
- 程序编码
- Testing the program
- 验证程序
用户要求:用户的需求是必须的,因为没有用户,我们就不能做任何事情。因此,用户要求是制定程序代码的重要组成部分。
问题分析:The second steps for writing program are problem analysis. Problem analysis means how this problem solved.
输入和输出:编写程序的第三个步骤是输入和输出。它指出解决问题需要多少输入和输出。
设计算法:For solving the problem"Algorithm"is implemented. An algorithm is a sequence of steps gives method of solving the problem. This"Algorithm"creates the logic of the program.
程序代码:The last step for solving the problem is program code. It is the much important part of the program. So program code is written according to the算法。
Testing the program:这意味着给变量给出一些已知值,并通过与手动计算值进行比较来检查结果。选择了测试值,以至于测试了流程图的每个部分,因此该程序被确认没有任何逻辑错误。
验证程序:程序的用户很可能会输入值,而该值不会预期。此类值应被您绘制的步骤拒绝。这被称为数据验证。