#include #include #include #define NUMBER_OF_SCORES 8 #define NUMBER_OF_PERFORMANCES 3 typedef struct { // Structure that represents Dive data char *name; int difficulty; } DiveType; typedef struct { // Structure that represents Performance data DiveType dive; float scores[NUMBER_OF_SCORES]; } PerformanceType; typedef struct { // Structure that represents Athlete data char *name; char *country; PerformanceType performances[NUMBER_OF_PERFORMANCES]; } AthleteType; DiveType dives[5]; // An array to hold the 5 types of dives AthleteType athletes[3]; // An array to hold the 3 athletes // Procedure that displays an athlete, his/her performances as well as // the 8 individual scores for each performance. void displayAthlete(AthleteType athlete) { printf("Athlete: %s from %s:\n", athlete.name, athlete.country); for (int p=0; p