[ad_1]
My question is simple, i want to use this loading bar but i want to print the content in two separated lines.
Here is the code:
#include <stdio.h>
#include <string.h>
int main (){
for (float i = 0; i < 10000; i++){
printf("\r DOING THIS thing ... In progress %.2f%%", i/100);
fflush(stdout);
}
printf("\n");
}
This give me the result in terminal like this:
DOING THIS thing … In progress 99.99%
What i want is this:
DOING THIS thing …
In progress 99.99%
I try, obviasly, a \n but this just creates a new line for each iteration of the loop.
If someone now a simple way to make this i would be really appreciated.
[ad_2]