请问在这里getchar的作用是什么
#include <stdio.h>void main ( )
{ int day;
char raining;
printf("Enter day (use 1 for Sunday)");
scanf("%d",&day);
getchar();
printf( "Is it raining? (Y/N)");
scanf("%c", &raining);
if ( ( day == 1) || (day == 7) ) // Sat or Sun
{ if (raining == 'Y')
printf( "Read in bed");
else
printf("Have fun outdoors");
}
else
{ printf( "Go to class ");
if (raining == 'Y')
printf( "Take an umbrella");
}
}