Code: Select all
printf("\b"); //backspaces on char
printf("\r"); //return to beginning of line
Code: Select all
for (i=0; i<1000; i++){
printf("%d%%", i * 100/1000); // show percentage
for (j=0; j<1000000; j++); // delay
printf("\r");
}
Code: Select all
printf("\b"); //backspaces on char
printf("\r"); //return to beginning of line
Code: Select all
for (i=0; i<1000; i++){
printf("%d%%", i * 100/1000); // show percentage
for (j=0; j<1000000; j++); // delay
printf("\r");
}