Int main (void) { Int a=0;//the number of Printf (" please input the number of arbitrary \ n "); The scanf (" % d ", & amp; A); Int n [a]; int k=0;//brackets Printf (" please enter any score \ n ");//printf () is the output function, the scanf () is the input function For (k=0; K<=(a - 1); K++) { The scanf (" % d ", & amp; N [k]);//the scanf () in the parameter list notice "& amp;" } For (k=0; k<=(a - 1); K++) {
If (n [K] <0 | | n [K] & gt; 100)//ruled out less than zero or greater than 100 Printf (" input points wrong \ n "); Else if (n [K] /0=59) & lt;=n & lt;=59 Printf (" E \ n "); Else if (n [K] <=69)//59 & lt; N & lt;=69 Printf (" D \ n "); Else if (n [K] <=79)/69 & lt; N & lt;=79 Printf (" C \ n "); Else if (n [K] <=89)/79 & lt; N & lt;=89 Printf (" \ n B "); Else if (n [K] <=100)/89 & lt; N & lt;=100 Printf (" A \ n "); } return 0; }
CodePudding user response:
What's wrong? Compile or run wrong?
CodePudding user response:
Int n [a]; -- -- -- -- -- -- -- -- -- -- - is wrong here? Data statement with a constant, cannot use the variable a
CodePudding user response:
Int n [a];=="" c language does not support this definition array, a is a constant value,