.. .

may i ask how to equate letter to number?

ex.)

a=5
b=4
c=8
d=9
e=3
g=7
SAMPLE OUTPUT:

enter num:587.9

output:acg.d
int value['z'-'a'+1] = {5, 4, 8, 9, 3, 7, ...};
Edit: I read it backwards, but you get the idea.
Last edited on
ne555, I don't think that would work... He wants corresponding letters and numbers. So I guess the best way to do that would be a 2D array...
I think parallel arrays would be better, but that's just me. I don't like working with 2D arrays :P
ne555 suggestion is good. All you have to do is: int x = value[ch - 'a']; Where ch is 'a' ...
tnx to 4 of you who help me :)
its a very big help to me :)

i finished my program \m/
Last edited on
Topic archived. No new replies allowed.