I need help making a code modular. It needsa function prototype, function definition and function call. #include int ticketsValid(double sectionA, double sectionB, double sectionC); int totalIncome...


I need help making a code modular. It needsa function prototype, function definition and function call.



#include




int ticketsValid(double sectionA, double sectionB, double sectionC);
int totalIncome ();


using namespace std;




int main()
{


double sectionA =0;
double sectionB =0;
double sectionC =0;




int ticketsValid(double sectionA);
{

     while (sectionA > 300 || sectionA <=>
      {

        cout<"maximum of="" 300="" seats="" in="" section=""><>

        cout <"enter the="" number="" of="" tickets="" sold="" in="" section="" a:="" "="">
        //Section A input
        cin >> sectionA;


    }
    int ticketsValid(double sectionB);

    while (sectionB > 500 || sectionB <=>
     {

        cout <"maximum of="" 500="" seats="" in="" section="" b"=""><>

        cout <"enter the="" number="" of="" tickets="" sold="" in="" sectionb:="" "="">
           cin >> sectionB;
     }
     int ticketsValid(double sectionC);
       while (sectionC > 200 || sectionC == 0)
     {

        cout <"maximum of="" 200="" seats="" in="" section="" c"=""><>
           cout < "enter="" the="" number="" of="" tickets="" sold="" in="" section="" c:="">

        cin >> sectionC;
     }


int totalIncome(double sectionA, double sectionB, double sectionC);
    {
       int totalIncome = (sectionA * 20) + (sectionB * 15) + (sectionC * 10);

    cout <"the income="" generated="" is="" $"=""><>
    }


    //return variables
    return (sectionA, sectionB, sectionC);}


}    }



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here