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 Questions
Back | Up | Next

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
Data save statements
Up
Introduction to Programming
Next
Chapter 7 Answers

Back ] Home ] Up ] Next ]

CHAPTER 7

EXERCISES

1. Draw a flowchart and write a program to create a file to keep track of stock purchases. Use the file processing statements presented in this chapter. The file should include a record for each stock purchased. Each record should be composed of three data fields: name of stock, purchase price per share, and number of shares bought. Use the INPUT statement to enter the data for the file.

2. Four candidates are running for public office. To win, a candidate must receive over 50% of the votes cast. Draw a flowchart and write a program to accumulate total votes for each candidate and determine if a candidate has won or if a runoff election is required. Print the result and print each candidate’s name and total votes for each. The file to be used as input is stored on tape or disk and consists of records from six districts. Each record contains the following fields:

1. Candidate number (1-4)—variable X

2. Candidate name—string variable N$

3. District number (1-6)—variable D

4. Number of votes—variable V

The records in the file are in no particular order.

Back ] Home ] Up ] Next ]

 

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