输入100名学生的出生月份,统计并输出每个月份过生日的学生人数。
#include
#define N 100
void main ()
{
int i, month;
int birth [13]={0}; /*birth [1]~birth [12]分别保存1~12月过生日的学生数*/
for (i=1;i<=N;i++)
{
scanf(″%d″, ); /*第一空*/
if (month >=1 && month<=12) birth [month]++;
}
for (i=1; ;i++) /*第二空*/
printf(″%d month \n″,i, birth [i]); /*第三空*/
}