题目内容

下面程序的运行结果是()#include int main(){ int a,s,n,count;a=2;s=0;n=1;count=1;while(count<=7){n=n*a;s=s+n;++count;}printf("s=%d",s);return 0;}

查看答案
更多问题

下面程序的功能是输出1至100之间每位数的乘积大于每位数的和的数,请填空。#include int main(){ int n,k=1,s=0,m;for (n=1;n<=100;n++){k=1;s=0;;while(){ k*=m%10;s+=m%10;;}if (k>s) printf("%d",n);}return 0;}

下面程序段的运行结果是#include int main(){char ch[]="600";int a,s=0;for (a=0;ch[a]>='0'&&ch[a]<='9';a++)s=10*s+ch[a]-'0';printf("%d",s);return 0;}

以下程序的运行结果是#include void f(int a[]){ int i=0;while (a[i]<=10){printf("%3d",a[i]);i++;}}int main(){int a[]={1,5,10,9,11,7};f(a+1);return 0;}

下面程序的运行结果是#include int main(){char a[]="12345",*p;int s=0;for (p=a;*p!='\0';p++)s=10*s+*p-'0';printf("%d",s);return 0;}

答案查题题库