11 char LETTERS
[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
13 assoc
letter_value (char id
, char* ref
)
17 for (int i
= 0; i
< 26; i
++)
20 return (assoc
) {id
, i
+ 1};
24 int string_value (char* string
, char* ref
)
27 int length
= strlen(string
);
29 for (int i
= 0; i
< length
; i
++)
31 assoc val
= letter_value(string
[i
], ref
);
38 int digital_sum (int num
, int base
)
43 result
= result
+ (num
% base
);
50 int digital_root (int num
, int base
)
53 num
= digital_sum(num
, base
);