This is my code:

```
#include <stdio.h>

// count lines in input
main() {
  int c, nl;
  nl = 0;

  while ((c = getchar()) != EOF) {
    if (c == '\n')
      ++nl;
  }
  printf("%d\n", nl);
}

```

Whenever I build and run this program, it opens a console window and when I press `enter` it does not give me the newline count.