Tuesday, August 16, 2011

How to convert a phone number in letters to numbers?

I havent read your whole question, but I will guide you the key point in solving your problem, which I had figured out when I was at your age, i dont know which language you are developing in, C++, java, C#, but all is same, if C++ then use the "char(var)" to get the ASCII code for A-Z or a-z 0-9, they are probably in the range 57-(+26) for alphabats and (+26)-(+10) for 0-9 numeics, so all you gotta do is test for their corresponding ASCII codes and there you go, problem solved, compare them in if(==) statement, if you use C# or JAVA it is more easy use getASCII() function and compere it

No comments:

Post a Comment