Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program (NOT C++) that stores data from a football teams recent results file results.txt into a struct array and prints out a

Write a C program (NOT C++) that stores data from a football teams recent results file results.txt into a struct array and prints out a each teams first result in such format: [TEAM SCORE OPPONENT] and also calculate the amount of goals scored and conceded for each team.

results.txt format: TEAM OPPONENT***SCORE (Home Score:Away Score)

example: Manchester United Chelsea***2:1 Arsenal***3:0

Chelsea Liverpool***0:1 Sheffield United***4:0 Leicester City Brighton Hove and Albion***3:5 West Ham United***3:2

Output:

Manchester United 2:1 Chelsea Chelsea 0:1 Liverpool Leicester City 3:5 Brighton Hove and Albion

Manchester United Scored 5 goals and conceded 1. Chelsea Scored 4 goals and conceded 1. Leicester City Scored 6 goals and concede 7.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions