Home > Back-end >  Why I ask bosses output always 10
Why I ask bosses output always 10

Time:09-21

Int main ()
{
Int n=0, a, b;
The scanf (" % d ", & amp; N);//the number n
Int cj [100].
Int k=0;
Int t=0, s=0;
Int I [100];
For (k=0; K<=(n - 1); K++)
{
The scanf (" % d ", & amp; Cj [k]);
}
The scanf (" % d ", & amp; t);
For (s=0; S<=(t - 1); S++)
{
The scanf (" % d % d ", & amp; A, & amp; B);
For (k=0; K<=(n - 1); K++)
{
If (a<=cj [k] | | cj [k] <=b)
{
I [s] + +;
}
}
}
For (s=0; S<=(t - 1); S++)
{
Printf (" % d ", I [s]);
return 0;
}
return 0;

}

CodePudding user response:

Is I input the number 10 he seems don't test is within the range of output directly

CodePudding user response:

CodePudding user response:

Look you are debugging the value of ab

CodePudding user response:

Topic posted and have a look

CodePudding user response:

What do you want to make it output? According to the code, should indeed so output
  • Related