Electrical and Computer Engineering
15 of 23
UAH
CPE 112
Problem-Solving Case Study
•Problem: You are asked to compute the average salaries for male and female employees of a company. •Input: A file, incFile (ifstream), of floating-point salary amounts (float), one per line, preceded by ‘F’ or ‘M’ (char). •Output: All the input data. The number of females (int), average income (float). The number of males (int), average income (float)