输入一个以回车结束的字符串(少于80个字符),统计该字符中英文字母的个数。该如何解决

输入一个以回车结束的字符串(少于80个字符),统计该字符中英文字母的个数。
初学者,如题,帮帮忙吧!

------解决方案--------------------
#include <stdio.h> 
#include <ctype.h> 

int main() 

int c, n = 0; 
while ((c = getchar()) != 10) 
if (isalpha(c)) ++n; 
printf( "英文字母个数:%d ", n); 
}

不好意思,看错了