Sunday, May 26, 2019

It 210 Week 7

1. 2 a. Input names of students from the user, terminated by ZZZ,0,0,0, and create a data file grades with phonograph recordings of the following mold student (String), test1 (Integer), test2 (Integer), test3 (Integer) Analysis Processes 1. Display Input student name and test scores screen 2. Prompt for Student name 3. Prompt scores 4. come calculations 5. Provide student names, scores and total Input 1. Student Name 2. Test Scores Output 1. Display Student name, scores and total entertain StudentName as string Declare Test1 as integer Declare Test2 as integer Declare Test3 as integer Open GRADES For Output As TestScoresSet Test1, Test2, Test3 = 0 salve Enter students name and test scores. Write Enter ZZZ for students name when finished. Input StudentName, Test1, Test2, Test3 While StudentName ZZZ Write TestScores, StudentName, Test1, Test2, Test3 Write Enter students name and test scores. Write Enter ZZZ for students name when finished. Input StudentName, Test1, Test2, Test 3 End While Close TestScores 2. Display the contents of the file GRADES created in Problem 1. Each students 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 as follows R. Abrams 76 84 82 242 Declare Sum as integer Open GRADES For Input As TestScores While non (TestScores) Read TestScores, StudentName, Test1, Test2, Test3 chalk up Test1 + Test2 + Test3 = Sum Write StudentName, , Test1, Test2, Test3, Sum End While Close TestScores Declare Sum as integer Open GRADES For Input As TestScores While Not (TestScores) Read TestScores, Abrams, 76, 84,82, Add 76 + 84 + 82 = 242 Write Abrams 84, 82, 76, 242 End While Close TestScores Expected Output Abrams 76 84 82 242

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.