I am working on the interface of the program. Cause it takes long time to run, I am thinking of having a progress bar, which it shows how many percentage it completed. For example, after

cout<<"20% is completed"

, may I ask how I can erase it and replace with

cout<<"21% is completed" afterward?

Many thanks and I appreciate any help.