我看着书上的例子。这个程序按什么键结束
#include <stdio.h>int main ()
{
int grade;
int aCount = 0, bCount = 0;
printf("Enter the letter grades.\n");
printf("Enter the EOF character to end input.\n");
while ((grade = getchar ()) != EOF)
{
switch (grade)
{
case 'A': case 'a':
++aCount;
break;
case 'B': case 'b':
++bCount;
break;
case '\n' :case' ':
break;
default:
printf("Incorrect letter grade entered.");
printf("Enter a new grade.\n");
break;
}
}
printf("\nTotals for each letter grade are: \n");
printf("A:%d\n", aCount);
printf("B:%d\n", bCount);
return 0;
}