Fortune Telling Collection - Zodiac Analysis - C language calculates the constellation according to a person's ID number.

C language calculates the constellation according to a person's ID number.

When continuous input, it is necessary to clear the residual characters in the input stream. Just make a slight modification:

while( 1){

if ( scanf("%* 10s%4d ",& ampm)= = EOF)break;

fflush(stdin); //Clear the remaining characters in the input stream.

Don't change a word, everything is the same.

If (m < = 419&; & ampm & gt= 32 1)printf(" Aries \ n "); ....