int CalculateYears()
{
int result = 0;
const int maleCount = 1750000;
const int femaleCount = 1500000;
int maleCurrentCount = maleCount;
int femaleCurrentCount = femaleCount;
while (femaleCurrentCount < maleCurrentCount)
{
++result;
femaleCurrentCount += (femaleCurrentCount / 100.0 * 35.0);
maleCurrentCount += (maleCurrentCount / 100.0 * 25.0);
}
return result;
}
Comments
Leave a comment