Linux Learning progress bar design ProgressBar

Source: Internet
Author: User

The progress bar is the computer in the processing of tasks, real-time, in the form of pictures to show the speed of processing tasks, completion, the amount of remaining unfinished tasks, and may need to process time, usually in a rectangular bar display.

#include <stdio.h>

#include <stdlib.h>

void ProgressBar ()

{

Char buffer[21]={0};

int count=0;

int i=5;

while (COUNT!=20)

{

i=5;

while (i--)

buffer[count++]= ' # ';

printf ("%-20s[%d%][100%]\n", BUFFER,COUNT*100/20);

Sleep (1);//usleep (1000)

System ("clear");//fflush (stdout);

}

}

int main ()

{

ProgressBar ();

return 0;

}

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/6E/wKioL1b_tv6z_n6UAABOr06hywk584.png "title=" QQ picture 20160402200657.png "alt=" Wkiol1b_tv6z_n6uaabor06hywk584.png "/>

This article is from the "Small Stop" blog, please be sure to keep this source http://10541556.blog.51cto.com/10531556/1759616

Linux Learning progress bar design ProgressBar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.