Hey Guys i need a pseudocode that should be look like this :
Start
Declare: lastName, finalGrade, outfile
Open "grades.dat" For Output As outfile
Write "Enter last name and final grade separated by spaces: "
Write "Enter 0 for both when done"
Read lastName, finalGrade
While lastName != '0'
Write outfile, lastName, finalGrade
Write "Enter last name and final grade separated by spaces: "
Write "Enter 0 for both when done"
Read lastName, finalGrade
End While
Close outfile
Here are my student records , i need to compute the average of the four scores for each person and print to the screen the last name and average. It sounds easy but it confused me a little bit. Any suggestions ???
Smith 80 90 80 90
Jones 70 80 70 80
Reed 95 90 95 90
Kirl 100 90 100 90
3 1426 RedSon 5,000
Recognized Expert Expert
Hey Guys i need a pseudocode that should be look like this :
Start
Declare: lastName, finalGrade, outfile
Open "grades.dat" For Output As outfile
Write "Enter last name and final grade separated by spaces: "
Write "Enter 0 for both when done"
Read lastName, finalGrade
While lastName != '0'
Write outfile, lastName, finalGrade
Write "Enter last name and final grade separated by spaces: "
Write "Enter 0 for both when done"
Read lastName, finalGrade
End While
Close outfile
That looks like pretty good pseudo code to me.
I know it looks right, but i was wondering that my pseudocode is wrong coz I only declare Final Grade, how can i make statement wherein four grades will be computed?
RedSon 5,000
Recognized Expert Expert
First I dont see anywhere in your pseudo code where you read in the values of the grades next to the last name. Once you do that all you need to do is loop through that same process for each record in the file.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mojo |
last post by:
Ok,
I don't want to much help but I need a push. I am supposed to write a
program with 3 classes:
1. Controlling class
2. Student class
3. Grades class
Controlling class instantiates a student...
|
by: Kirk Bevins |
last post by:
Hello, new to posting, got a dilema in c++. I cant seem to create new
instances of my student class. The idea is to make a database where
the user inputs surnames and library card numbers etc. The...
|
by: laj |
last post by:
HI,
Excuse this new question, I am trying to impress my wife by putting a
db together for her dance studio. I put a table with all students new
and old with fields including name and address and...
|
by: sallyk07 |
last post by:
Modify the Student class so that each student object should also contain the scores for three tests. Provide a constructor that sets all instance values based on parameter values. Overload the...
|
by: Dave White |
last post by:
Hello Everyone,
I have created two tables to track my students' lessons.
Each student is responsible for most, but not all. of the lessons.
I've tried a junction table but I can't figure out...
|
by: xxbabysue123xx |
last post by:
Heres the problem:
Create a class Student with instance data name, studentNumber, class (where class is a String containing one of the following: “Freshman”, “Sophomore”, “Junior”, “Senior”. ...
|
by: Synapse |
last post by:
hi everyone..im trying to create a student list program using linked list that will display all my info of students..but it seems theres a little prob. after i enter my first student the program will...
|
by: withu4ever |
last post by:
I learned how to use struct when I try to write a program i face some misstakes which I cant correct
This is the program:
-------------------------------------------------------
...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |