以下程序运行后的输出结果是_______。#includeint main(){int i,j=5,s;s=0;for(i=1;i<=5;i++)s=s+i+j--;printf("%d",s);}
查看答案
以下程序运行后的输出结果是_______。#include void fun(int a, int b){ int t;t=a;a=b;b=t;}void main(){ int x=10,y=20;fun(x,y);printf(“%d,%d\n”,x,y);
以下程序运行后的输出结果是_______。#includeint main(){ int i;char s[]="COMPTUER";char c;i=0;while(s[i]!='\0'){c=s[i];s[i]=s[i+1];s[i+1]=c;i=i+2;}printf("%s",s);}
以下程序运行后的输出结果是_______。#includeint f(int n){if(n==0||n==1) return 1;elsereturn n+f(n-1);}int main(){printf(“%d\n”,f(0));printf(“%d\n”,f(1));printf(“%d”,f(5));}
运行时,若输入5♢7♢-1<回车>(♢表示空格),则输出结果是_______。#includevoid main(){int a;scanf(“%d”,&a);while(a>0){switch(a){case 5:printf(“%d\n”,a+1);case 6:printf(“%d\n”,a+2);break;case 7:printf(“%d\n”,a+3);default:printf(“%d\n”,a+4);}scanf(“%d”,&a);}}