Necessary tools for bloggers: Eliminate row number Software

Source: Internet
Author: User

Blog gardens are full of cool people, and the code they write is all magical. Sharing it is a good thing. What is the problem with a full screen number!

The source of the problem is very simple. When the scalpers paste code in the blog garden, there is an option to "display the row number". The scalpers gently click it and then the row number is displayed. The code looks good, we have to worry about it. I wanted to study the code and copy it to the editor. Then I found that each line has a row number. If you don't believe it, you can try it. Here is a code with a line number: http://www.cnblogs.com/ma6174/archive/2011/12/07/2279614.html. How can I run the code without deleting the row number? Then we have to delete a row and a row. The code is too short to say, but in the blog garden, there are thousands or tens of thousands of lines in code writing. Is it a test of our endurance? Haha, just kidding. In order to solve this problem, the younger brother spent several minutes writing a small software to help you eliminate the row number instantly.

The source code is as follows:

 

# Include <stdio. h>
# Include <string. h>
# Include <stdlib. h>
Void welcome ()
{
Printf ("\ t necessary tools for bloggers-Remove line numbers \ n ");
Printf ("\ t BY ma6174 \ n ");
Printf ("\ t ma6174@163.com ");
Printf ("\ n usage: \ n ");
Printf ("first copy the complete code for removing the row number here, \ n click the Enter key ,");
Printf ("Press" Ctrl + Z "and press enter again. Annoying line numbers are all gone \ n ");
For (int I = 0; I <80; I ++)
Printf ("= ");
Printf ("\ n ");
}
Int main ()
{
Welcome ();
Char s [1000];
Int I, len, tag;
FILE * fp;
Fp = fopen ("temp.txt", "w ");
If (fp = NULL ){
Printf ("file opening failed! ");
Exit (1 );
}
While (gets (s ))
{
Len = strlen (s );
I = 0;
While (s [I] = '') I ++;
While (s [I]> = '0' & s [I] <= '9') I ++;
While (I <len-1)
Fprintf (fp, "% c", s [++ I]);
Fprintf (fp, "\ n ");
}
Fclose (fp );
System ("start temp.txt ");
}

 

If you are too lazy to compile it, you can download the software that can run directly to my Network Disk: http://ma6174.ys168.com/

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.