#include <stdio.h>main(){ int c, nl; nl = 0; while ((c = getchar()) != EOF) if(c == '\n') ++nl; printf("%d\n", nl);}
Standard input is empty
0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!