I am a beginning Prog Logic and Design student. I have a project to write pseudocode and draw a flow chart to do the following. From an Alumni File I have the following fields

Alumnus Number
Alumnus Name
Major

I want to get all Alumni With a Major in Bus, who graduated from 1984 and then print the total of the Alumni listed, then create a flow chart showing how to do this.

I have started it like this:

Start
If Major ="Bus" then
Printf "Alumnus Number","Alumnus Name"
Else End Then
Get calculated total of "Alumus Name"
Printf Numeric Total "Alumnus Name"
Stop

Is this correct? I am not sure what to do if the answer is No to the first 2 conditions. Can someone help me? I think I can flowchart it okay if I can just get this part of it.

Thank you!

## All 4 Replies

You need some sort of loop to look at all the records and accumulate the total number you found. Something like

while more entries
increment count
next
display the count

Thank you for your help I have retyped it and am doing the flowchart. Hopefully this will be right I have my class tomorrow so I will know then. This is a practice for us and I get confused. It is afterall the first one! Thanks Again I will let you know how it went and what I did wrong!

Can anyone give me some suggestions.
This is what I have so far.

Logic Problem:

You run a retail store and you have decided to step through your inventory one record at a time and put everything on sale. For each item in your inventory you want to print out the sale price for 4 days. The first day of the sale you mark the items down 10%, the next day you mark them down another 10% based on the previous sale price. The third day of the sale, you mark them down another 10% based on the previous sale price. The fourth day of the sale, you mark them down another 10% based on the previous sale price.

Draw the logic flowchart or write the pseudocode to solve this problem. Your flowchart or pseudocode should be complete. That means start with the mainline and include housekeeping, processing and wrapup.

START:

Perform HouseKeeping()
While not eof
Perform mainloop()
Endwhile
Perform wrapup()

Stop

HouseKeeping()
Declare variables
Open Inventory
Open Printer
Return

Main Loop

SalesPriceDay1 = RetailPrice – 10%
SalesPriceDay2 = SalesPriceDay1 – 10%
SalesPriceDay3 = SalesPriceDay2 – 10%
SalesPriceDay4 = SalesPriceDay3 – 10%

While not eof
Print SalesPriceDay1
Print SalesPriceDay2
Print SalesPriceDay3
Print SalesPriceDay4
Endwhile

Hi,

I just posted a question and I saw yours, so I wanted to share my 2cents worth of ideas with you.

To answer the question what to do if the answer is No to the first 2 conditions.

Well lets take it step by step if the answer is No to the first condition that is Major != "Bus" then you will need to skip it and go on to the next record. You need alums with major = "Bus" and nothing else.

same thing goes for the 2nd condition, if it is not equal to 1984 even though major = "Bus" you toss it out and go on to the next record.

Until you reach the end of the Alumni File, you keep searching for these two conditions. Once you reach the end of the file, well you are done them.

I also suggest to keep the count each time you find a record, so after the line:

Printf "Alumnus Number","Alumnus Name"

You would increment the counter by 1 say using something like

counter++ or ++counter

I hope this helps...

I am a beginning Prog Logic and Design student. I have a project to write pseudocode and draw a flow chart to do the following. From an Alumni File I have the following fields

Alumnus Number
Alumnus Name
Major

I want to get all Alumni With a Major in Bus, who graduated from 1984 and then print the total of the Alumni listed, then create a flow chart showing how to do this.

I have started it like this:

Start
If Major ="Bus" then