whitch的问题
#include "stdafx.h"#include<stdio.h>
int main(void)
{
char ch;
int a_ct, e_ct, i_ct, o_ct, u_ct;
a_ct = e_ct = i_ct = o_ct = u_ct = 0;
printf("Enter some text : enter # to quit:\n");
while((ch = getchar()) != '#')
{
switch(ch)
{
case 'a':
case 'A': a_ct++;
break;
case 'e':
case 'E': e_ct++;
break;
case 'I':
case 'i': i_ct++;
break;
case 'o':
case 'O': a_ct++;
break;
case 'u':
case 'U': a_ct++;
break;
default:break;
}
printf("number of vowels: AEIOU\N");
printf(" %4d %4d %4d %4d\n,
a_ct, e_ct, i_ct, o_ct, u_ct");
}
getchar();
return 0;
}