As posted, I couldn't compile it. You seem to have misplaced several semicolons.
while ((calcdif >(-100)) || (calcdif >100));
{
if (calcdif < (-100));
{
est = est - adj;
adj = adj / 2;
}
else if (calcdif > 100);
{
est = est + adj;
adj = adj / 2;
}
You may want to double-check your loop condition.
Could you post sample input and expected output as well?
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314