Hello!
I am writing some practice programs and I was just wondering, what should I do so that instead of getting an output like this:
1 2 3 4 5 6
|
Percent Complete: 1%
Percent Complete: 2%
Percent Complete: 3%
Percent Complete: 4%
Percent Complete: 5%
...
|
I instead just have one line (Percent Complete:) where only 'i' is updated ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
#include <iostream>
using namespace std;
int main()
{
for (int i = 0; i <= 100; i++)
{
cout << "Percent Complete: " << i << "%" << endl;
}
system("pause");
return 0;
}
|
Last edited on
Thank you both very much, I managed to fix it! :)