| |||||||||||||||
|
|
![]() 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:
The records in the file are in no particular order. |
|
Privacy Statement - Press Release - Copyright Information. - Contact Us - Support Integrated Publishing |