Order this information in Print

Order this information on CD-ROM

Download in PDF Format

     

Click here to make tpub.com your Home Page

Page Title: Chapter 7 Answers
Back | Up

tpub.com Updates

Google


Web
www.tpub.com

Home

   
Information Categories
.... Administration
Advancement
Aerographer
Automotive
Aviation
Combat
Construction
Diving
Draftsman
Engineering
Electronics
Food and Cooking
Math
Medical
Music
Nuclear Fundamentals
Photography
Religion
USMC
   
Products
  Educational CD-ROM's
Printed Manuals
Downloadable Books
   

 

Back
Chapter 7 Questions
Up
Introduction to Programming

Back ] Home ] Up ]

CHAPTER 7

EXERCISE SOLUTIONS

The following flowcharts and programs present possible solutions to the exercises.

1. Stock Purchase Flowchart and Program

2. Election Results Flowchart and Program

You may have noticed that the data field for candidate number contains a 1, 2, 3, 4, and that this code could be used as a subscript to reference the correct locations in the arrays. To modify the program to take advantage of this, you could replace statements 90 through 220 with the following statements:

90     LET K(X) = K(X) + V

100    LET N1$(X) = N$

110     GOTO 70

When the value of candidate number is 1, the number of votes cast for candidate 1 would be added to K(l); when it’s 2, the number of votes cast for candidate 2 would be added to K(2); and so on.

When you are defining data and data codes, it is a good idea to think about how you are going to use the data in the programs. You maybe able to save yourself coding time.

Figure 7-2.—Parts inventory flowchart and program.

Figure 7-2 cont’d.—Parts inventory flowchart and program.

Back ] Home ] Up ]

 

Privacy Statement - Press Release - Copyright Information. - Contact Us - Support Integrated Publishing