Posted in 面试题 onAugust 11, 2016
解:#include
#include
main()
#define s1(a,b) ((a) *(b))
#define s(c) sqrt(c )
{
float result;
int n1,n2;
scanf(“%d”,%n1);
scanf(“%d”,&n2);
result=s1(n1,n2);
result=s(result);
printf(“%f\n”,result);
}
#include
main()
#define s1(a,b) ((a) *(b))
#define s(c) sqrt(c )
{
float result;
int n1,n2;
scanf(“%d”,%n1);
scanf(“%d”,&n2);
result=s1(n1,n2);
result=s(result);
printf(“%f\n”,result);
}
计算 s=(x*y)1/2,用两个宏定义来实现
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@