You must first load all run data from the given text file to an array of bicycle results (an array of structs). In your program, the text file must be called "cykelloeb". Each line in the data file represents one result of one cycle race for one rider. The format of a line in the text file is:
race name rider name rider-age rider-hold nationality placement driving time
The placement can also be specified as DNF (did not finish) as a sign that the rider did not complete the race or as an over time limit (OTL) indicating that the rider did not reach the goal within the time limit of the race (thus not achieving a proper placement) . Driving time is specified in hours, minutes and seconds separated by the drawn colon. Riders who have not completed the race have a driving time indicated by the sign '-'. The seven components of a race result are separated by one or more spaces, although the group of age, team and nationality is encircled with the character '|'. Here is an example of a race result:
ParisRoubaix "Greg VAN AVERMAET" | 32 BMC BEL | 1 5:41:07
Cyclists are awarded a number of points based on their participation, and their achievements, in the bicycle race that is included in the data. Here are the rules for awarding points:
1) Participation points: Participation and implementation in a cycling race within the time limit gives 3 points. Participation and implementation in a cycling race outside the time limit gives 1 point.
2) Placement points: If you complete the cycle race without exceeding the time limit of the race, you get (M - P) / 13 extra points, where M is the number of riders who have run the race (including the riders who have received DNF) and P is the rider's position in run.
3) Podie points: In addition to this, the winner of a bicycle race will receive 10 extra points, the second two will receive 5 extra points, and the number three will get 2 extra points.
Write a C program with the following troubleshooting features:
Find and print the race results for all Italian cyclists over 30 years. In this task, it is OK to create a function that just prints the results directly.
Write a function that returns an array of all the Danish riders who have completed one or more of the four bicycle races, either with a location or with OTL. Call the feature and print these Danish riders and how many races each Danish rider has completed. Note that each rider only wishes to be printed once.
Print the 10 riders who have achieved the most points. Sort primarily riders by number of points. By punctuality, the riders are sorted alphabetically by surname. (The last name is that part of the rider's name, which is written in uppercase letters. Note that the surname may also contain spaces and special characters).
In this task, focus is on the two cycling race Paris Roubaix and the Amstel Gold Race. Write a function that finds the rider who has completed both of these races and has the minimum total driving time in the two races. The function must have the rider and total driving time as output parameters. Call the function and print the rider's name and total driving time (in hours, minutes and seconds).
Calculate the average age (of the double type) among all the riders who have achieved a top position in one or more cycling bets. Be sure that riders who have a top ten result in two or more of the four races are not included once more in the average calculation.
Write a main function, which in a simple text-oriented dialog with the user allows activation of the above functions. It is recommended that this part of the program be made as simple as possible.
Suppose your translated program is on the [login to view URL] file. When your program is running as
[login to view URL] - print
it must - without receiving any input from the user - print your results for all tasks in a clear and clear way on the standard output. (Use program parameters to main to achieve this).
32 freelancers are bidding on average $365 for this job
Hi, Thanks for posting this job. I am familiar to c programming. And I have rich experience. I am interested in your project. I hope to work with you. Please invite me. Thanks. With Regards.
I can do this project. I have experience of C & C++ and Java programming for 4+ years. I can satisfy you perfectly. Please contact me and discuss in detail.
Dear client. Nice to meet you. I've read you project description carefully and very interested. Let's discuss over chat and get started. Waiting your reply. Warm regards.