Let us learn C in Code <10> flowchart

Flowchart which is a types of diagram in programming uses simple geometric symbols and arrows to define relationships among the difference sections ,represent an algorithm or data processing.  The flowcharts really like an instruments, anyone can fulfill a process step by step as the flowchart showing, but firstly, make sure the flowchart is correct.

These geometric symbols as the schematic shows below. The flowchart provides us with some reference points when dealing with  a process.


Drawing this schematic costs me so much time and energy. I should have a rest. This chapter will go on, lately i will take some examples  to practice the flowchart then code depend on the flowcharts.

Ok, let's go on the flowchart article, we have introduce the pseudocode in the previous chapter. Sometime both of the methods are very well for designing or showing the code.If you want to me explain what's the difference? I'm sorry i don't know. That really depends. Some gays like us pseudocode, some like using the flowchart, other maybe have more better method to design a program. Surely, the folks just code in mind without anything depends. But for me , i like us the flowchart to design my program. The most important issues, the flowchart is visible, logical and is easy to understand, so i really advice you to use the flowchart to design your program.

Now let us analysis some situation as below, then use the flowchart to detail these processes.

0) Please detail what have you done from morning till now. 


This schematic shows some basic geometric symbols to use in a flowchart, we can see thatONE,the arrow join the difference pars together, and the arrow is the direction, like the liquid flows higher to lower naturally, you can not reverse .So the arrow in the program like the sentences being executed  step by step.TWO,the  diamond represents a decision , and the YES or NO just a boolean value, this boolean illustrates whether the sentence is TRUE or not(FALSE),when we meet the diamond we can use the if... or  if...else...  or if..elseif...else.. to represent, lately we know there are some other keyword can be used to represent this decision(diamond) like switch.Then relaying on the boolean value to decide where to jump  .THREE , the rectangle used to illustrate an operation ,action or a process, you can fulfill a calculation or a algorithm or a procession.FOUR, oval just marks the starting or ending point of the program, most time it contains "start" or "end" word. 

Here we just list some important issues ,you can refer to the codes listed previous chapters.Here, let introduce a new conception called comment , the comment is programmer readable annotations in our source code .In C code, there are two ways to write the comments in our program.

Time limited, next time let us go on this chapter, we will code depends on the flowchart above, then add some comments in our code.

Have a nice day !

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值