If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: convert a String of letters to an Integer number

Hello, I want some help.
I would like a program in C language by preference, how can convert a String of letters (or some words analyzed to letters) to an Integer number.
Each letter has a value based on the following formula: a=599, b=120, c=357, d=409, e=516, f=696,…,z=276
At the end of the conversion all the values of each letter must be added to a total (number).

For example the string : bad = 120 + 599 + 409 =
So is the total number.

64 is subtracted from the Ascii value of each byte "A" = 65 - 64 = 1,
"Z" = 90 - 64 = 26. This routine only works for letters. If you have punctuation or spaces, remove is from tmpString before calling this function.