Points to remember 1 in order to ensure that the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: indentation in pseudocode is the same technique used with the various programming languages. Its sole purpose is to clarify the logical structure of the program. With this technique, we can tell at a glance, which statements make up each of the logic structure of the total program logic. To fully appreciate this factor, the reader should compare the equivalent nonindented pseudocode of Figure 11.21 with that of Figure 11.20. The difference in clarity would be far greater if this were a longer pseudocode covering, for instance, one or more pages. Set Count to zero Read first student record DO WHILE Sexcode is not equal to Z IF Sexcode = F THEN Calculate Percentage IF Percentage = > 45 THEN IF Percentage < 60 THEN Write output data >• Add 1 to Count ENDIF ENDIF ENDIF Read next student record ENDDO Write Count Stop Advantages and Limitations of Pseudocode Advantages Pseudocode has three main advantages: 1. Converting a pseudocode to a programming language is much more easier than converting a flowchart or a decision table to a programming language. 2. As compared to a flowchart, it is easier to modify the pseudocode of a program logic when program modifications are necessary. 3. Writing of pseudocode involves much less time and effort than drawing an equivalent flowchart. Pseudocode is easier to write than an actual programming language because it has only a few rules to follow, allowing the programmer to concentrate on the logic of the program. Limitations Pseudocode, however, suffers from the following limitations: 1. In case of pseudocode, a graphic representation of program logic is not available. 2. There are no standard rules to follow in using pseudocode. Different programmers use their own style of writing pseudocode and hence communication problem occurs due to lack of standardization. 3. For a beginner, it is more difficult to follow the logic of or write pseudocode, as compared to flowcharting. Points to Remember 1. In order to ensure that the program instructions are appropriate for the problem at hand and in the correct sequence, programs must b...
View Full Document

Ask a homework question - tutors are online