Home > Back-end > The program runs without problems, but there have been three alarm, how to eliminate the three warni
The program runs without problems, but there have been three alarm, how to eliminate the three warni
Time:09-25
Include Int main () { //function declaration; Int Max (x, y, z); Int min (x, y, z); Int the add (x, y, z); Int the process (int x, int y, int z, int (* fun) (int x, int y, int z));
//input values Int a, b, c; Printf (" enter a, b, andc: "); The scanf (" % d, % d, % d ", & amp; A, & amp; B, & amp; C); //pointer function point to seek maximum Printf (" Max="); The process (a, b, c, Max). //pointer function point to seek the minimum Printf (" min="); The process (a, b, c, min); //pointer to function of a and b, and pointing to Printf (" sum="); The process (a, b, c, add); return 0; }
//function definition Int Max (int x, int y, int z) { Int max1, Max; Max1=x> y? x:y; Max=max1 & gt; Z? Max1: z; return max; } Int min (int x, int y, int z) { Int min1, min; Min1=x> y? Y: x; Min=min1 & gt; Z? Z: min1; Return min; } Int the add (int x, int y, int z) { Int sum; Return the sum=x + y + z;
} Int the process (int x, int y, int z, int (* fun) (int x, int y, int z)) { Int result; Result=fun (*) (x, y, z); Printf (" % d \ n ", result); return 0; }
CodePudding user response:
If you say "three alarm" is not national secrets, can put the specific content of warning post?