Chapter 5 Programming Problems

Chapter 5 Programming Problems - Write “Enter ZZZ for...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 5 Programming Problems Problem 1 Declare Student Name as string Declare Test1 as integer Declare Test2 as integer Declare Test3 as integer Open “GRADES” For Output As TestScores Set Test1, Test2, Test3 = 0 Write “Enter students name and test scores separated by commas.” 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 separated by commas.” Write “Enter ZZZ for students name when finished.” Input StudentName, Test1, Test2, Test3 End While Close TestScores Declare StudentName as string Declare Test1 as integer Declare Test2 as integer Declare Test3 as integer Open “GRADES” For Output as TestScores Set Test1, Test2, Test3 = 0 Write “Enter students name and test scores separated by commas.”
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Write “Enter ZZZ for students name when finished.” Input John Doe, 98, 90, 75 While StudentName <> “ZZZ” Write Test Scores, John Doe, 98, 90, 75 Write “Enter students name and test scores separated by commas.” Write “Enter ZZZ for students name when finished.” Input ZZZ, End While Close TestScores Problem two Declare Sum as integer Open “GRADES” For Input as Test Scores While Not EOF (Test Scores) Read 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 EOF (TestScores) Read Test Scores, John Doe 98, 90, 75 Add 98+90+75=263 Write “John Doe: 98, 90, 75, 263” End While Close TestScores Expected Output: John Doe: 263...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern