Electrical and Computer Engineering
21
of 23
UAH
CPE 112
Problem Solving Implementation
•
if
(sex == 'F')
•
{
•
femaleCount++;
•
femaleSum = femaleSum + amount;
•
}
•
else
•
{
•
maleCount++;
•
maleSum = maleSum + amount;
•
}
•
// Update ending condition
•
incFile >> sex >> amount;
•
}
•