Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- short int letterToInt(char a)
- {
- if(a <109) // m
- {
- if(a < 103) // g
- {
- if(a< 100) // d
- return 0; // a b c
- else
- return 1; // d e f
- }
- else
- {
- if(a < 106) // j
- return 2; // g h i
- else
- return 3; // j k l
- }
- }
- else
- {
- if(a < 116) // t
- {
- if(a < 112) // p
- return 4; // m n o
- else
- return 5; // p q r s
- }
- else
- {
- if(a < 119)
- return 6; // t u v
- else
- return 7; // w x y z
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment