Mercurial > hg > CbC > old > device
comparison test/multi.c @ 640:04211a2cf227
*** empty log message ***
author | kono |
---|---|
date | Wed, 01 Nov 2006 01:27:11 +0900 |
parents | f3af9f3332f5 |
children | e9622935a621 |
comparison
equal
deleted
inserted
replaced
639:f3af9f3332f5 | 640:04211a2cf227 |
---|---|
10 | 10 |
11 int | 11 int |
12 f(ARRAY a) | 12 f(ARRAY a) |
13 { | 13 { |
14 int i,j; | 14 int i,j; |
15 int b[LEN0][LEN1]; | |
15 | 16 |
16 j = a[1][1]; | 17 j = a[1][1]; |
18 j = b[1][1]; | |
19 | |
17 for(i=0;i<LEN0;i++) | 20 for(i=0;i<LEN0;i++) |
18 for(j=0;j<LEN1;j++) | 21 for(j=0;j<LEN1;j++) |
19 printf("f %d %d = %d\n",i,j,a[i][j]); | 22 printf("f %d %d = %d\n",i,j,a[i][j]); |
20 | 23 |
24 for(i=0;i<LEN0;i++) | |
25 for(j=0;j<LEN1;j++) | |
26 b[i][j] = i*100 + j; | |
27 | |
28 for(i=0;i<LEN0;i++) | |
29 for(j=0;j<LEN1;j++) | |
30 printf("fl %d %d = %d\n",i,j,b[i][j]); | |
21 } | 31 } |
22 | 32 |
23 int | 33 int |
24 main() | 34 main() |
25 { | 35 { |
36 int b[LEN0][LEN1]; | |
37 | |
26 int i,j; | 38 int i,j; |
27 j = a[1][1]; | 39 j = a[1][1]; |
28 | 40 |
29 for(i=0;i<LEN0;i++) | 41 for(i=0;i<LEN0;i++) |
30 for(j=0;j<LEN1;j++) | 42 for(j=0;j<LEN1;j++) |
32 | 44 |
33 for(i=0;i<LEN0;i++) | 45 for(i=0;i<LEN0;i++) |
34 for(j=0;j<LEN1;j++) | 46 for(j=0;j<LEN1;j++) |
35 printf("m %d %d = %d\n",i,j,a[i][j]); | 47 printf("m %d %d = %d\n",i,j,a[i][j]); |
36 | 48 |
49 for(i=0;i<LEN0;i++) | |
50 for(j=0;j<LEN1;j++) | |
51 b[i][j] = i*100 + j; | |
52 | |
53 for(i=0;i<LEN0;i++) | |
54 for(j=0;j<LEN1;j++) | |
55 printf("l %d %d = %d\n",i,j,b[i][j]); | |
56 | |
57 | |
37 f(a); | 58 f(a); |
38 } | 59 } |
39 | 60 |