This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: While Student <> “0” Write NewFile, Student, test3 Write “Enter the student’s name and test score.” Write “Enter ZZZ for both when done.” Input Student, Score End While Close NewFile End Input Module 2. Display the contents of the file GRADES created in Problem 1. Each student’s record should appear on a separate line and include the total score (the sum of the three tests) for that student. For example, a line of output might be: R. Abrams 76 84 82 242 Declare sum as real Sum = test1 + test2 + test3 Open “GRADES” for Input As GradeFile While Not EOF(GradeFile) Read GradeFile, Name, test1, test2, test3 Write Name,” “, test1, test2, test3, sum End While Close GradeFile Output J.Smith 80 88 86 236 M. Smith 89 67 99 255...
View Full Document
This note was uploaded on 01/25/2011 for the course IT 210 taught by Professor Josephpillera during the Spring '10 term at University of Phoenix.
- Spring '10