填空题
以下程序运行时,输出到屏幕的结果中第一行是
1
(13)
2
,第二行是
3
(14)
4
。 #include
#include
int fun(int a,int b) {int n; while(a!=b) {n=abs(a-b); a=(a>b)?b:a; b=n; } return a; } void main
5
{printf("%d/n%d/n",fun(9,15),fun(9,5)); }
1、
2、
3、
4、
【正确答案】
1、(13), 2、3, 3、(14), 4、1
【答案解析】
提交答案
关闭