Chapter 5 Programming Problem

Chapter 5 Programming Problem - 1. Input names of students...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records of the form: student (string), test1 (integer), test2 (integer), test3 (integer) Input-Process-Output Chart Analysis Process: 1. Display a program title 2. Get user input 3. Declare last, first name 4. Declare Test Score 1, 2, 3 Input: Last, first name (string: Last, first name) Test Score 1, 2, 3 (real: Test Score 1, 2, 3) Output No output Design Main Module Declare student as string Declare test1 as integer Declare test2 as integer Declare test3 as integer Call Input Module End Program Input Processes Output Last Name First Name Test Score 1, 2, 3 1. Create Grades File No Output
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
End Main Module Input Module Open “GRADES” For student NewFile Write “Welcome to the student grade input system” Write “Enter the student’s name and test scores on each line.” Write “Enter ZZZ for next student.” Input student, test1, test2, test3 While student <> “ZZZ” Write NewFile, student, test1, test2, test3
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Chapter 5 Programming Problem - 1. Input names of students...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online