Answered step by step
Verified Expert Solution
Question
1 Approved Answer
input - Not Defteri Dosya Dzen Biim Grnm Yardm Seinfeld 1989 1998 Friends 1994 2004 Community 2009 2015 Disenchantment 2018 2021 Sitcoms: In the inputs.txt
input - Not Defteri Dosya Dzen Biim Grnm Yardm Seinfeld 1989 1998 Friends 1994 2004 Community 2009 2015 Disenchantment 2018 2021 Sitcoms: In the "inputs.txt file, you will see the name, start year and end year of 4 different series. Write a C program that reads the information of the series from inputs.txt" file, and stores them into an array of structure. Then, ask for the user to enter 3 characters (players) for each series, and store these characters into the structure too. Calculate the number of seasons for each series by subtracting the start year from the end year, then store the number of seasons in the same structure again. The program should write the number of seasons and the characters of each series into another text file (outputs.txt). Note that creating only one structure will be enough for this assignment. The sample run and your output file should look like the ones below: Sample Run: Enter 3 players of Seinfeld: jerry george elaine Enter 3 players of Friends: monica rachel pheobe Enter 3 players of Community: jeff britta abed Enter 3 players of Disenchantment: luci elfo dagmar Output File: output.txt - Not Defteri Dosya Dzen Biim Grnm Yardm Seinfeld lasted 9 seasons characters: jerry george elaine Friends lasted 10 seasons Characters: monica rachel pheobe Community lasted 6 seasons Characters: jeff britta abed Disenchantment lasted 3 seasons Characters: luci elfo dagmar Process exited after 103.2 seconds with return value o Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started