GetCharKey
char GetCharKey(int phoneKey, int place)
{
char letter;
switch (phoneKey) {
case 0:
letter = '0';
break;
case 1:
letter = '1';
break;
case 2:
switch (place) {
case 1:
letter = 'A';
break;
case 2:
letter = 'B';
break;
case 3:
letter = 'C';
default:
break;
}
break;
case 3:
switch (place) {
case 1:
letter = 'D';
break;
case 2:
letter = 'E';
break;
case 3:
letter = 'F';
default:
break;
}
break;
case 4:
switch (place) {
case 1:
letter = 'G';
break;
case 2:
letter = 'H';
break;
case 3:
letter = 'I';
default:
break;
}
break;
case 5:
switch (place) {
case 1:
letter = 'J';
break;
case 2:
letter = 'K';
break;
case 3:
letter = 'L';
default:
break;
}
break;
case 6:
switch (place) {
case 1:
letter = 'M';
break;
case 2:
letter = 'N';
break;
case 3:
letter = 'O';
default:
break;
}
break;
case 7:
switch (place) {
case 1:
letter = 'P';
break;
case 2:
letter = 'R';
break;
case 3:
letter = 'S';
default:
break;
}
break;
case 8:
switch (place) {
case 1:
letter = 'T';
break;
case 2:
letter = 'U';
break;
case 3:
letter = 'V';
default:
break;
}
break;
case 9:
switch (place) {
case 1:
letter = 'W';
break;
case 2:
letter = 'X';
break;
case 3:
letter = 'Y';
default:
break;
}
break;
default:
break;
}
return letter;
}