请各位大神指教,结果为什么不是2*a的值?
#include<stdio.h>int fun(int x, int y)
{
if (x != y)
return ((x + y) / 2);
else return (x);
}
main()
{
int a = 4, b = 5, c = 6;
printf("%d\n", fun (2*a,fun(b,c)));
}
#include <stdio.h> int fun( int x, int y ) { if( x != y ) return (x+y)/2; return x; } int main( void ) { int p = fun( 5, 6 ); int q = fun( 8, p ); printf( "%d\n", q ); }