正在加载图片...
s1=s2=0: for(i=0;i<6;i++){ switch(a[i]%2){ case 0:s2+=a[i];break; case 1:s1+=aCi];break; } printf("d %d\n",s1,s2); 4.include<stdio.h void main(){ inta[3][3]={3,5,7},{9,11,13},(6,8,20}: inti,*p=&a[0][0]; for(i=0;i<9;i++){ if(*p>10)printf("%d",p); p十十; } printf("\n"); 5.include<stdio.h> #include<string.h> struct Worker char name[15];int age;float pay;); void main(){ struct Worker x; char*t="liouting”; int d=38;float f=400; strcpy(x.name,t); x.age=d;x.pay=f; x.age十+;x.pay*=2; printf("%s %d %6.2f\n",x.name,x.age,x.pay); 1384sl二s2=0; for(i=0;i<6;i++){ switch (a[ 1〕%2){ case 0 case 1 :s2十 :sl+ a[i];break; a[i];break; } } printf (" o d%d\ n",sl,s2); 4.#include< stdio. h> void main(){ inta[3][3]={{3,5,7},(9,11,13},{6,8,20)}; int i,,p= &a[0][0]; for(i=0;i<9;i十+){ if(*p>10) printf("ood”,*P); P++; } printf C\n "); 5.#include< stdio. h> #include<string. h> struct Worker{char name[15]; void main(){ str uct Worker x; char二t=fhouting"; int d=38;float f=400; strcpy(x. name,t); x. age=d; x. pay= f; x. age++;x. pay* =2; printf ("% s环d%6. 2f\n',x. } 1384 int age;float pay; nam e ,x. age, x. pay);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有