.

Monday, March 11, 2019

It 210 Week 7

1. 2 a. scuttlebutt pattern of students from the user, terminated by ZZZ,0,0,0, and create a data institutionalize grades with records of the future(a) form student (String), test1 (Integer), test2 (Integer), test3 (Integer) Analysis Processes 1. Display Input student break and test cross offs screen 2. strike for bookman trope 3. Prompt scores 4. Perform calculations 5. Provide student names, scores and total Input 1. Student Name 2. Test Scores Output 1. Display Student name, scores and total Declare 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 keep 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, Test3 End While crocked TestScores 2. Display the contents of the file GRADES created in Problem 1. Each students record should come out of the closet 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 Not (TestScores) necessitate TestScores, StudentName, Test1, Test2, Test3 Add 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