Home > Back-end >  Could you tell me the input line number n, n line of Yang hui triangle where is wrong? To solve the
Could you tell me the input line number n, n line of Yang hui triangle where is wrong? To solve the

Time:11-28

#include
Int main ()
{
int n;
The scanf (" % d ", & amp; N)
While (n> 0)
{
Printf (" Yang hui triangle ");
n--;
}
If (n<=0)
Printf (" data entry is not correct ");
return 0;
}

CodePudding user response:

Error:
1. Behind the scanf didn't;
2. Return 0; Wrong statements the indentation

CodePudding user response:

The scanf (" % d ", & amp; N) the end of ";"
no.Printf (" Yang hui triangle \ n "); The lack of \ n
If (n & lt;=0) printf (" data entry is not correct "); Should be moved to the while () statement before,
  • Related