How fast are your cycles? Are they in the millisecond, or seconds. If your cycles are short, you may only want to update the screen after a second as elpased.
For example
include <time.h> /* if memory serves me correctly */
int currentTime = time(0);
for ( int i = 0; i < 100; i++)
{
/* do work here and save the percentage completed */
lastTime = time(0);
if ((lastTime-currentTime) >= 1 )
{
/* output percentage completed (using AraK information) */
currentTime = lastTime;
}
}
This will only update the screen every second and save the time writing to the screen as it consumes time to redraw the screen (which you can use for processing). In addition, if your updates go so fast, this lets the user see the percentage if your cycles are quite short, as you could be redrawing the screen all of the time.
Note: Updated based on comments.