| |
Lab 10a: File Averages
Page history
last edited
by Mr. Kretsch 5 months, 1 week ago
Name: ______________________________________________________
Objective:
For loops and file input
Instructions
- Open your File Averages project.
- Add a button to your form
- When the user clicks the new button, your program should do the following:
- Open a File Open form to get a file name
- Once the user has selected a file, display the file name in one of the two labels.
- The file you should use to test the program is in R:\Basic\data\nscores.txt. The file contains a list of numbers. The first number in the list should contains the number of values in the rest of the file.
- Your program will read the file one line at a time and calculate the average of the values in the file.
Extra Credit
Grading
| Feature |
Points |
Out of |
Notes |
| File retrieval |
|
2 |
|
| File input |
|
4 |
|
| Average calculation |
|
2 |
|
| Total |
|
8 |
|
Notes
Lab 10a: File Averages
|
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
Comments (0)
You don't have permission to comment on this page.