- Print the Movie names, list of actors/actresses, ratings(number of tickets sold), ticket prices, cost of production and the total net profit of each movie(net_profit_of_movie) b) Write a function that calculates the net_profit_of_movie; which is the multiplication of ticket prices and ratings(number of tickets sold), subtracted by cost of production c) In main call function, print all movies’ information and the net_profit_of_movie to the console. d) Create a file called movies.txt and write all movies information to the file, including the net_profit_of_movie per movie. e) Ask the user to add more movies (use realloc). The user needs to write at least 1 more movie (e.g. movie 4) then get all information for the new movies from the user. Create a file called UpdatedMovies.txt and write all movie data including the lately added movies’ data onto the file UpdatedMovies.txt.
- Print the Movie names, list of actors/actresses, ratings(number of tickets
sold), ticket prices, cost of production and the total net profit of each
movie(net_profit_of_movie)
b) Write a function that calculates the net_profit_of_movie; which is the
multiplication of ticket prices and ratings(number of tickets sold), subtracted
by cost of production
c) In main call function, print all movies’ information and the
net_profit_of_movie to the console.
d) Create a file called movies.txt and write all movies information to the file,
including the net_profit_of_movie per movie.
e) Ask the user to add more movies (use realloc). The user needs to write at least
1 more movie (e.g. movie 4) then get all information for the new movies from the user. Create a file called UpdatedMovies.txt and write all movie data including the lately added movies’ data onto the file UpdatedMovies.txt.
f) Write (Mohammad) and (63223) at the top of the code.
g) Write explanatory comments for your code
Step by step
Solved in 2 steps