How to Count How Many Lines of Code You Have
- 1). Examine the edges of the compiler. The total lines in your program are typically listed in a status bar located at the bottom of the page. Commonly you'll see "Lines: <#>" or "l: <#>." It is also common to have line numbers listed next to each line of code, organized in a column.
- 2). Create an error at the end of your program. It can be anything; mash the keyboard with your palm and then try compiling. The compiler will come back with errors, one of which will be the one you created. The error message will list the line number where the error occurred. Since you made the error at the very end of your program, you now know how many lines are in it.
- 3). Copy and paste all of your code into a word processing program such as Microsoft Word, or Notepad++; the total number of lines will be tallied and displayed to you through this other program. Just be wary, as sometimes page breaks can add additional lines which may not actually be present in your code.
Source...