Iterative programs are consistently reused steps within programming, the basic flowchart for iterative programs follows the steps below:
- Establish the variable we are going to use
- Initialize outside the loop
- Setup the right end test
- Construct the block of code
- the set of instructions that will be done each time through the loop
- the variable must change each time or you will end up in an infinite loop
- What happens when the iteration is done
- Assume that if you are getting inputs from a user, don't expect the user to give them what you want.
- If you are getting something from another part of the program or an external source, expect the source and information to not be as expected.
- Make sure that all possible paths through the code are accounted
- Make sure there is a possible path through
No comments:
Post a Comment