fork download
  1. // Supporting structures
  2. struct date {
  3. int month;
  4. int day;
  5. int year;
  6. };
  7.  
  8. struct time {
  9. int hour;
  10. int minute;
  11. };
  12.  
  13. struct owner {
  14. char name[100];
  15. char address[200];
  16. };
  17.  
  18. struct trainer
  19. {
  20. char name[100];
  21. int starts;
  22. int wins;
  23. int places;
  24. int shows;
  25. };
  26.  
  27. struct jockey
  28. {
  29. char name[100];
  30. float weight;
  31. int starts;
  32. int wins;
  33. int places;
  34. int shows;
  35. };
  36.  
  37. struct track_record {
  38. char holderName[50];
  39. struct date recordDate;
  40. float time; // Record time in seconds
  41. };
  42.  
  43. struct race_conditions {
  44. char raceType[50];
  45. char trackSurface[20];
  46. char trackCondition[20];
  47. float raceDistance; // In furlongs
  48. };
  49.  
  50. struct performance_totals {
  51. int starts;
  52. int wins;
  53. int places;
  54. int shows;
  55. float earnings;
  56. int speedFigure;
  57. };
  58.  
  59. // Main structures
  60. struct race_details {
  61. struct date raceDate; // Date of the race
  62. struct time raceTime; // Time of the race
  63. int raceNumber; // Specific race number identifier
  64. char trackName[50]; // Name of the track
  65. char trackCode[10]; // Short code for the track
  66. struct race_conditions conditions; // Race conditions
  67. float purse; // Purse amount
  68. struct track_record record; // Track record details
  69. char raceType[50]; // Type of the race
  70. char wagersAvailable[100]; // Available wagers
  71. char qrCode[100]; // QR code for race details
  72. char notes[200]; // Space for notes
  73. };
  74.  
  75. struct horse_details_and_past_performance {
  76. int programNumber; // Program number
  77. char horseName[50]; // Horse name
  78. char horseGender; // Gender of the horse (M/F/G)
  79. int age; // Age of the horse
  80. char color[20]; // Color of the horse
  81. char sire[50]; // Sire of the horse
  82. char dam[50]; // Dam of the horse
  83. struct owner ownerDetails; // Owner details
  84. struct trainer trainerDetails; // Trainer details
  85. struct jockey jockeyDetails; // Jockey details
  86. float weightCarried; // Weight carried
  87. char medicationAndEquipment[100]; // Medication and equipment details
  88. float morningLineOdds; // Morning line odds
  89. float claimingPrice; // Claiming price
  90. char silks[100]; // Description of silks
  91. char saddleClothColor[20]; // Saddle cloth color
  92. struct performance_totals lifetime; // Lifetime performance totals
  93. struct performance_totals currentYear; // Current year performance totals
  94. struct performance_totals previousYear; // Previous year performance totals
  95. struct performance_totals trackSpecific; // Performance at this track
  96. struct performance_totals distanceSpecific; // Performance at this distance
  97. char recentWorkoutLines[200]; // Recent workout lines
  98. int daysUnraced; // Days since last race
  99. };
  100.  
  101. int main() {
  102. // Arrays to hold race and horse details
  103. struct race_details myRaces[10];
  104. struct horse_details_and_past_performance myHorses[20];
  105.  
  106. // Nothing else needs to be added to main
  107. return 0;
  108. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty