现有如下程序段#include "stdio.h"int aa(int x,int y);main(){int a=24,b=16,c;c=aa(a,b);printf("%d\n",c);}int aa(int x,int y){int w;while(y){w=x%y;x=y;y=w;}return x;}则程序段的输出结果是A.8B.7C.6D.5
题目
现有如下程序段
#include "stdio.h"
int aa(int x,int y);
main()
{int a=24,b=16,c;
c=aa(a,b);
printf("%d\n",c);}
int aa(int x,int y)
{int w;
while(y)
{w=x%y;
x=y;
y=w;}
return x;}
则程序段的输出结果是
A.8
B.7
C.6
D.5
相似考题