When writing my pseudocode I declare my variables in a module called housekeeping(). We are currently working on reading input from a file or files rather than asking the user directly for input. I am a bit confused how this might work with my pseudocode though. I know how I might write it out but am unsure of the file I am pointing to. In this project I would need to point to the file which contains the player’s number, name, etc.. The print chart is an output file so it would not come from there. Where and how might I include the fictitious input needed for the program to run?
Open input file X. Read from X
Open output file Y. Write to Y
Basically, that's all you need for terminology.
char columnHead = “PLAYER NUMBER FIRST NAME LAST NAME BATTING AVERAGE”
In the line above would you space twice after player number and 16 spaces after first name because that is how many char spaces are allotted? Or is it just spacing enough between the headings to allow everything to fit and look nicely?
Leave enough space for your field size plus a couple characters between columns.
Reputation Points: 3281
Solved Threads: 896
Posting Sage
Offline 7,753 posts
since May 2006