Electrical and Computer Engineering
18 of 23
UAH
CPE 112
Problem Solving Implementation
•int main()
•{
•    char     sex;       // Coded 'F' = female, 'M' = male
•    int      femaleCount; // Number of female income amounts
•    int      maleCount;   // Number of male income amounts
•    float    amount;      // Amount of income for a person
•    float    femaleSum;   // Total of female income amounts
•    float    maleSum;     // Total of male income amounts
•    float    femaleAverage;    // Average female income
•    float    maleAverage;      // Average male income
•    ifstream incFile;          // File of income amounts
•     string     fileName;         // External name of file
•