There are some small mistakes. You have many syntax errors.
EDIT: Salem was faster. Look at his avatar, it will help
Code:
#include<stdio.h>
#include<conio.h>
int main() /* It's int! Arrggh! */
{
int c, n1 = 0; /* Why not initialize n1 to zero? */
clrscr();
while ((c = getchar()) != '#' && c != EOF) /* ASSIGN c to getchar() and also stop at end of input */
if (c == '\n') /* No semicolon here */
++n1;
printf("%d\n",n1);
getch();
return 0; /* Here, see why it's int? */
}
return 0 from main means everything is done, there were no severe errors. Anything else means the program didn't do its jobproperly (because of a bug, environment etc.)