Home > Back-end >  The small white to solve
The small white to solve

Time:12-22

Input two integers a and b, determine its size, if a> B, output 1; If a/*

CodePudding user response:

 
Void func (int a, int b)
{
If (a & gt; B)
Printf (" 1 \ n ");
Else if (a & lt; B)
Printf (" \ n - 1 ");
The else
Printf (" 0 ");
}

CodePudding user response:

Purely because is no more than 10 lines of code, just wrote you,
We recommend this kind of question LZ or write your own, have questions to ask,
 int f (int a, int b) {
Return a> B? 1: (a}
Int main () {
Int a, b;
The scanf (" % d % d ", & amp; A, & amp; B);
Printf (" % d ", f (a, b));
return 0;
}
  • Related