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/