The springfork amateur gold club has a tournament every weekened. The club presi
ID: 3535025 • Letter: T
Question
The springfork amateur gold club has a tournament every weekened. The club president has asked you to design two programs.
1)a program that will read each player's name and golf score as keyboard input,and then save these recors in a file name gold.dat(each record will have a field for the players name and a field for the players score)
2)a program that reads the recors of golf.dat file and displays them
Create a psuedocode & a flowchart in C language,i promise points will be rewarded if all parts answered correctly!
Explanation / Answer
(1)
1 Declare String name
2 Declare Integer score
3 Display "Enter name"
4 Input name
5 Display "Enter score"
6 Input score
7 Open output file "C:FOLDERNAMEgolf.dat" AS X
8
9 Write X, name, score
10 Close X
(2)
Declare String name
Declare Integer score
Open Input file "C:FOLDERNAMEgolf.dat" As X
While NOT eof (1)
Input X, name, score
Display name &" "& score
Loop
Close X
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.