·¢²¼Ê±¼ä : ÐÇÆÚËÄ ÎÄÕ»ªÖпƼ¼´óѧ±ê×¼CÓïÑÔ³ÌÐòÉè¼Æ¼°Ó¦ÓÃÏ°Ìâ´ð°¸¸üÐÂÍê±Ï¿ªÊ¼ÔĶÁ1c41f8b0fb0f76c66137ee06eff9aef8941e4886
Îĵµ½ö¹©²Î¿¼£¬²»µ±Ö®´¦£¬ÇëÁªÏµ¸ÄÕý¡£
#include
int a[3][3],sum; int i,j;
sum=0;/*error*/ for(i=0;i<3;i++) {
for(j=0;j<3;j++)
scanf(\ }
for(i=0;i<3;i++) sum=sum+a[i][i];
printf(\ }
void main() { fun(); } 5.2
#include
2020Äê4ÔÂ19ÈÕ
21
Îĵµ½ö¹©²Î¿¼£¬²»µ±Ö®´¦£¬ÇëÁªÏµ¸ÄÕý¡£
void main( void ) {
float Num[10];
float Input,GetNum[11]; int i,j; float a=6;
for(i=0; i<10; i++) {
Num[i]=a; a=a+7.5; }
Loop1: printf(\ scanf(\
if((Input<0)||(Input>70)==1) goto Loop1;
for(i=0; i<10; i++ ) {
if(Input 2020Äê4ÔÂ19ÈÕ 22 Îĵµ½ö¹©²Î¿¼£¬²»µ±Ö®´¦£¬ÇëÁªÏµ¸ÄÕý¡£ goto Loop2; } Loop2: for(j=0; j GetNum[j]=Num[j]; GetNum[j]=Input; for(j=i; j<=10; j++,i++) GetNum[j+1]=Num[i]; for(j=0; j<11; j++ ) printf(\ } 5.3 #include \ #include \ main() { int a1,a2,a3,a4,a5,a6,a7,a8,a9; int a[3]; int i; for(;;) 2020Äê4ÔÂ19ÈÕ 23 Îĵµ½ö¹©²Î¿¼£¬²»µ±Ö®´¦£¬ÇëÁªÏµ¸ÄÕý¡£ { for (i=0;i<3;i++) { } while((a[0]!=a[1]) && (a[0]!=a[2]) && (a[1]!=a[2]))/*get a[i]=rand()%3; three different numbers 0,1,2*/ { a1=a[0]+1;/*divide 1~9 into three groups,a1~a3,a4~a6,a7~a9*/ a2=a[1]+1; a3=a[2]+1; a4=a1+3; a5=a2+3; a6=a3+3; a7=a1+6; a8=a2+6; a9=a3+6; /* make sure that each line and each row is made up with three members in different group.*/ /* such as: a9 a1 a5 a2 a6 a7 24 2020Äê4ÔÂ19ÈÕ