以下程序的运行结果是__________short test(short a,short b){short k=a%b;while(k){a=b;b=k;k=a%b;}return b;}int main(){short a=35,b=56;printf("%d",test(a,b));}
查看答案
#include int fun(int x);int main(){ printf("%d",fun(4)); return 0;}int fun(int x){ if(x==1)return 3; return x*x+fun(x-1);}程序输出结果为( )
以下程序输出结果为int compute(int n){if(n==1)return 1;return compute(n-1)+n*n;}int main(){printf("%d\n",compute(3));}
填空题:以下程序的运行结果是#includeint main(){int a=3, b=4;a = a - b;{int b= 2;a = a - b;b = a + b;printf("%d %d ",a,b);}printf("%d %d",a,b);return 0;}
以下程序的输出结果是什么?#include int a = 5;int main(){void fun();int a = 0,i;for(i = 0; i< 3; i++)fun();printf("%d",a);return 0;}void fun(){printf("%d",a--);}