Exercises

8.1 Describe the various shapes used in drawing flowcharts.

8.2 Describe how the various keywords used in PDL can be used to describe the operation of a program.

8.3 What are the advantages and disadvantages of flowcharts?

8.4 It is required to write a program to calculate the sum of numbers from 1 to 10. Draw a flowchart to show the algorithm for this program.

8.5 Write the PDL statements for the question in (4) above.

8.6 It is required to write a program to calculate the roots of a quadratic equation, given the coefficients. Draw a flowchart to show the algorithm for this program.

8.7 Write the PDL statements for the question in (6).

8.8 Draw the equivalent flowchart for the following PDL statements:

img

8.9 It is required to write a function to calculate the sum of numbers from 1 to 10. Draw a flowchart to show how the function subprogram and the main program can be implemented.

8.10 Write the PDL statements for the question (9) above.

8.11 It is required to write a function to calculate the cube of a given integer number and then call this function from a main program. Draw a flowchart to show how the function subprogram and the main program can be implemented.

8.12 Write the PDL statements for the question (8) above.

8.13 Draw the equivalent flowchart for the following PDL statements:

Get Using LEDs, LCDs and GLCDs in Microcontroller Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.