//Mia Agramon CS1A Chapter 11, P.645, #2
//
/*******************************************************************************
* Movie Profit Display
* _____________________________________________________________________________
* This programs displays information about 2 movies including their production
* costs and first year revenues.
*
* INPUT
* Movie information
* OUTPUT
* Movie information
******************************************************************************/
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
struct movieData
{
string title; //Movie Title
string director; //Movie Director
int yearReleased; //Year The Movie Was Released
int runtime; //Movie Runtime In Minutes
double productionCost; //Production Costs
double firstYearRev; //First Year Revenue
};
//Function Prototype
void movieDisplay(movieData info);
int main()
{
//Input
movieData evangelion = {"The End of Evangelion", "Hideaki Anno", 1997,
87, 9700000, 9261203.46};
movieData hereditary = {"Hereditary", "Ari Aster", 2018, 127, 10000000,
44100000};
//Output
movieDisplay(evangelion);
movieDisplay(hereditary);
return 0;
}
//Function To Display Movie Data
void movieDisplay(movieData info)
{
cout << fixed << setprecision(0) << endl;
cout << "Title: " << info.title << endl;
cout << "Director: " << info.director << endl;
cout << "Year Released: " << info.yearReleased << endl;
cout << "Runtime: " << info.runtime << " minutes" << endl;
cout << "Production Cost: $" << info.productionCost << endl;
cout << "First Year Revenue: $" <<info.firstYearRev << endl;
}