DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   Can someone please correct my pseudo code assignment? I'm new to this language. (http://www.daniweb.com/forums/thread160774.html)

clb8372 Dec 4th, 2008 5:15 pm
Can someone please correct my pseudo code assignment? I'm new to this language.
 
For each of the following problems, use the top-down modular approach and pseudo code to design a suitable program to solve it.

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) in this file, all test scores should be set equal to 0.


Process
1 Display the Program Title - "Student Test Score Program"
2 Get Student Name
3 Display Grade File- “Test Scores”
4 Calculate Student Grade- “Test Scores”
5 Display Student Grade Total
Input

Student Name -real

Student Test Score - real

Output

Student Test Scores Results - real

Main Module
      Declare Student as String
      Declare Test1 as integer
      Declare Test2 as integer
      Declare Test3 as Integer

Write “Welcome to the Student Test Score program”

      Call Student Grade File
      Call Calculate Student Grades
      Call Display Student Grades

End program

End Main Module Program

Student Grade File- Test Scores
Open “Student Grade File” for output test scores
      Write “Enter student name “
      Input  “ZZZ  when you are done”
      Input Student, Test (1), Test (2), Test (3)

While Student <> “ZZZ”
Set Test = 0
     
End While

End Student Grade File- Test Score Program

Calculate Student Grade - Test Scores
Declare  test scores as Integer
Set Total = Test (1) + Test (2) + Test (3)

End program

End Calculate Student Grade - Test Scores Program

Display Student Grade Total


End program

End Student Grade Program

ithelp Dec 5th, 2008 4:59 am
Re: Can someone please correct my pseudo code assignment? I'm new to this language.
 
Looks okay where are you struck ?

Agni Dec 5th, 2008 5:42 am
Re: Can someone please correct my pseudo code assignment? I'm new to this language.
 
Quote:

where are you struck?
I hope it didnt hurt much :) ...


All times are GMT -4. The time now is 1:34 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC