以下程序运行结果是______。#defineADD(x)x+x#include intmain(){intm=1,n=2,k=3;intsum=ADD(m+n)*k;printf(“sum=%d”,sum);return0;}
查看答案
下列程序运行的结果是__________ 。#include double sub(double x, double y, double z){y -= 1.0;z = z + x;return z;}int main( ){double a=2.5, b=9.0;printf("%6.2f\n", sub(b-a, a, a));return 0;}
下列程序运行的结果是__________ 。#include int fan(int n){int k;if (n==0||n==1)k=3;elsek=n-fan(n-2);return k;}int main( ){ printf("%d\n", fan(8));return 0;}
下列程序的输出结果是 __________ 。#includevoid fun(int d){int p;p=d++;printf("%d,", p);}int main( ){int a=1;fun(a);printf("%d\n",a);return 0;}
读程序从键盘输入1902,则程序的输出结果是:( )int fun(int n) {int m=0,c;while(n!=0){c=n%10;m=m*10+c;n=n/10;}return(m);}int main(){int m;scanf("%d",&m);printf("%d\n",fun(m));return 0;}