numerology
in
Programming Questions
•
3 years ago
Hi,
Im writing a program that after writing the name of a person, it calculates the numerology for that name
letters values:
1= a, j, s; 2= b, k, t; 3= c, l, u; 4= d, m, v; 5= e, n, w; 6= f, o, x; 7= g, p, y; 8= h, q, z; 9= i, r
http://en.wikipedia.org/wiki/Numerology
rough pseudocode:
1. calculate name value
2. minimize digits to 1
1calculate name value:
first the name string , length(),
each char on location digit is compared and given a value to be added in final result of the name,
Kind of done,
char cd = a.charAt(2);
if (a.equals(cd))
so, is this a good way to compare the letters values?
then add up all,
2. minimize digits to 1 digit
- problem: if sumatorie is a given int, how can I add the digits, so I end up with one digit?
option?
the sumatorie is an int, changed to string, compare each digit, to add it, but I get the value of the char,
How to know wich digit Im refering to, and add digits
Example for case 2:
109
1+0+9=10
1+0=1
thanks!!
Im writing a program that after writing the name of a person, it calculates the numerology for that name
letters values:
1= a, j, s; 2= b, k, t; 3= c, l, u; 4= d, m, v; 5= e, n, w; 6= f, o, x; 7= g, p, y; 8= h, q, z; 9= i, r
http://en.wikipedia.org/wiki/Numerology
rough pseudocode:
1. calculate name value
2. minimize digits to 1
1calculate name value:
first the name string , length(),
each char on location digit is compared and given a value to be added in final result of the name,
Kind of done,
char cd = a.charAt(2);
if (a.equals(cd))
so, is this a good way to compare the letters values?
then add up all,
2. minimize digits to 1 digit
- problem: if sumatorie is a given int, how can I add the digits, so I end up with one digit?
option?
the sumatorie is an int, changed to string, compare each digit, to add it, but I get the value of the char,
How to know wich digit Im refering to, and add digits
Example for case 2:
109
1+0+9=10
1+0=1
thanks!!