The task is to write a C/C++ program to draw a command-line progress bar.
Approach: To create a progress bar the idea is to use system() function which will give colored output. Below is the illustration of how to use system() function.
The system function accepts the following parameters for colouring the output screen:
- keyword: color
- Background color
- Foreground color
The above code will give White Color output with Bright Blue color on Background.
Below is the program to draw the progress bar in the command line in C/C++:
- Create Directory or Folder with C/C++ Program
- Create n-child process from same parent process using fork() in C
- C++ program to create a file
- Program to create Custom Vector Class in C++
- How to create a Heart using C Graphics
- C Program to create a House using Graphics
- How to create a custom String class in C++ with basic functionalities
- Custom Jumble Word Game
- Comparator Class in C++ with Examples
- Competitive Coding Setup for C++ and Python in VS Code using Python Script
- Program to find largest element in an array using Dynamic Memory Allocation
- Life cycle of Objects in C++ with Example
- C program to Compare Two Strings without using strcmp() function
- Minimum N-Digit number required to obtain largest N-digit number after performing given operations
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.