Unless you catch someone on a day where they feel extremely bored, I don't think you will find anyone to write this program for you. We are here to help people learn, not write their assignments. You will have to do it yourself, but we'll help you.
Start by making a test text file in notepad (or similar). Create 15 records. Use three lines per record. If you're doing baseball, use something like first line is for Name, second line for Hits, third line for RBI.
Then write the program that creates the datafile from this. It will need to have: [code] TYPE PlayerInfo = record Name : String; Hits : Word; RBI : Word; End;
VAR Players : Array[1..15] Of PlayerInfo; [/code]
Then load the text file in a loop, three lines at a time and store the info into each player. [code] PLAYERS[count].Name := Line1; PLAYERS[count].Hits := Line2; PLAYERS[count].RBI := Line3; [/code]
This is the general idea anyways. Your teacher should be able to help you get started and we'll help you along as well.
my teacher said he will not help at all. i joined the class three quarters through the semester because the teacher wanted me to learn this stuff even though i have no interest int it
Comments
: someone make one pleasee!
:
Well, at least it should serve as guide ... start coding and ask for help if you get stuck.
We are here to help people learn, not write their assignments.
You will have to do it yourself, but we'll help you.
Start by making a test text file in notepad (or similar). Create 15 records. Use three lines per record. If you're doing baseball, use something like first line is for Name, second line for Hits, third line for RBI.
Then write the program that creates the datafile from this. It will need to have:
[code]
TYPE
PlayerInfo = record
Name : String;
Hits : Word;
RBI : Word;
End;
VAR
Players : Array[1..15] Of PlayerInfo;
[/code]
Then load the text file in a loop, three lines at a time and store the info into each player.
[code]
PLAYERS[count].Name := Line1;
PLAYERS[count].Hits := Line2;
PLAYERS[count].RBI := Line3;
[/code]
This is the general idea anyways. Your teacher should be able to help you get started and we'll help you along as well.
BTW WriteLn() shows text to the screen.
...............