annotate test/fact0.c @ 792:3622e3f561db

struct offset alignment
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 22 Nov 2010 14:14:15 +0900
parents 0c256ea2a97e
children 5313ed059cee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
1 #include "stdio.h"
d35df41eac69 Initial revision
kono
parents:
diff changeset
2
d35df41eac69 Initial revision
kono
parents:
diff changeset
3 main(ac,av)
d35df41eac69 Initial revision
kono
parents:
diff changeset
4 int ac;
d35df41eac69 Initial revision
kono
parents:
diff changeset
5 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
6 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 172
diff changeset
7 printf("#0006:%d\n",fact(1,1,10 /*atoi(av[1])*/));
172
096559f07a70 some check
kono
parents: 17
diff changeset
8 return 0;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
9 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
10
d35df41eac69 Initial revision
kono
parents:
diff changeset
11 int
d35df41eac69 Initial revision
kono
parents:
diff changeset
12 fact(i,j,n)
d35df41eac69 Initial revision
kono
parents:
diff changeset
13 /*register*/ int i,j,n;
d35df41eac69 Initial revision
kono
parents:
diff changeset
14 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
15 if (i==n)
d35df41eac69 Initial revision
kono
parents:
diff changeset
16 return j;
172
096559f07a70 some check
kono
parents: 17
diff changeset
17 return fact(i+1,j*i,n);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
18 }