Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language defines short integer, and there is an unknown error when inputting with scanf function.
C language defines short integer, and there is an unknown error when inputting with scanf function.
# include & ltstdio.h & gt

# include & ltmath.h & gt

int main()

{ long int jisuan(short int a,short int n);

short int a=0,n,I;

Printf ("Please enter: \ na =");

i=scanf("%hd ",& ampa);

fflush(stdin);

printf(" n = ");

scanf("%hd ",& ampn); ?

fflush(stdin); ?

printf("a=%hd\tn=%hd\n ",a,n);

printf("i=%d\n ",I); //i is used to detect whether a has input;

}