IT/210
October 31, 2014
Daryl Davis
Declare Student[100] As String
Delare Test1[100] As Integer
Declare Test2[100] As Integer
Declare Test3[100] As Integer
Declare Count As Integer
Open “Grades” For Output As Newfile
Set Count = 0
Write “Enter the students name and test score from test 1.”
Write “Enter ZZZ for the name and 0 for score when done.”
Input Student
Input Test1
While Student != ZZZ and Test1,Test2,Test3 !=0 Write “Enter the students name and score from test 1.” Write “EnterZZZ for the name and 0 for the score when done.” Input Student[Count] Input Test1[Count]
Set Count = Count + 1 End While
For (K = 0, K < Count, K ++)
Write “Enter test 2 score for”+ Student[K]
Input Test2
Write “Enter test 3 score for”+Student[K]
Input Test3
Write Newfile, Student[K], Test1[K], Test2[K], Test3[K]
End For
Analysis: The problems required output is the students name with scores from three tests. Each student and scores shall be listed on separate lines. The input variables needed for this program include Test1, Test2, Test3, and Student.
Chapter 8 Problem 1. Part A and B