下面程序的运行结果是______。main(){ int i=0,j=10,k=2,s=0;{i+=k;if(i>j){printf("%d\n",s);break;}s+=i;}}
下面程序的运行结果是______。
main()
{ int i=0,j=10,k=2,s=0;
{i+=k;
if(i>j)
{printf("%d\n",s);
break;}
s+=i;}}
相关考题:
有以下程序#include stdio.hvoid fun(int *s,int nl,int n2){ int i,j,t;i=nl; j=n2;while(ij) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;}}main( ){ int a[10]={1,2,3,4,5,6,7,8,9,0},k;fun(a,0,3); fun(a,4,9); fun(a,0,9);for(k=0;k10;k++)printf("%d",a[k]); printf("\n");}程序运行的结果是 ( )A)0987654321B)4321098765C)5678901234D)0987651234
在下述程序中,判断i>j共执行的次数是( )。 main() { int i=0,j=10,k=2,s=0; for(;;) { i+=k; if(i>j) {printf("%d",s);break;} s+=i; } }A.4B.7C.5D.6
该程序运行的结果是( )。#include#include#define M 100void fun(int m, int *a, int *n){ int i,j=0;for(i=1;i=m;i++)if(i%7==0||i==0)a[j++]=i;*n=j;}main(){ int aa[M],n,k;clrscr();fun(10,aa,n);for(k=0;kif((k+1) ==0)printf("\n");else printf("M",aa[k]);printf("\n");}
有下列程序: include void fun(int * s,int n1,int n2) { int i,j, 有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9);fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]);printf("\n"); } 程序的运行结果是( )。A.987654321B.4321098765C.5678901234D.987651234
有下列程序: #includestdi0.h voidfun(int*S,intn1,intn2) { inti,j,t; i=n1;j=n2 while(ij){t=s[i];s[i]=s[j];s[j]=t;i++;j --;} } voidmain( ) { inta[10]={1,2,3,4,5,6,7,8,9,0),k; fun(a,0,3);fun(a,4,9);fun(a,0,9); for(k=0;k10;k++)printf(”%d”,a[k]);printf ("\n"); } 程序的运行结果是( )。A.0987654321B.4321098765C.5678901234D.0987651234
有以下程序#include stdio.hvoid fun(int *s,int n1,int n2){ int i,j,t;i=n1; j=n2;while(ij) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;}}main(){ int a[10]={1,2,3,4,5,6,7,8,9,0},k;fun(a,0,3); fun(a,4,9); fun(a,0,9);for(k=0;kl0;k++)printf("%d",a[k]); printf("\n");}程序的运行结果是A.0987654321B.4321098765C.5678901234D.0987651234
有以下程序includevoidfun(int*s,intn1,intn2){inti,j,t; i=n1j=n2; while(i 有以下程序 #include <stdio.h> void fun(int *s,int n1,int n2) { int i,j,t; i=n1 j=n2; while(i<j) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9); fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]); printf("\n"); } 程序的运行结果是A.987654321B.4321098765C.5678901234D.987651234
下面程序的运行结果是【 】。main(){ int i=0,j=10,k=2,s=0;for(;;){i+=k;if(ij){printf("%d\n",s);break; }s+=i; } }
在下述程序中,判断i>j共执行的次数是()。 main() { int i=0,j=10,k=2,s=0; for(;;) { i+=k; if(i>j) { printf("%d",s); break; } s+=i; } }A.4B.7C.5D.6