hye...i already go to
www.t9.com and i got the idea...
after i read the question over and over...i realize...the question just wanna convert from word to number...
so i make it...but still have a problem... try find out yourself..
i found that...after the 8 phone number..there is a symbol..i dont know how to remove it....
BTW i use c not c++..
ONE MORE THING, DONT USE CAPITAL WORDS BECAUSE THE COMPUTER WILL HANG.. i dont know why...can somebody help me fix this problem?
thanks
/////////////////////////SOURCE CODE////////////////////////////////////////////
#include<stdio.h>
#include<conio.h>
#include<iomanip>
const char to_num_table[] = "2223334445556667077888999";
int main(void)
{
printf("\n**************************************** **************************************");
printf("\n**************************************** **************************************");
printf("\n DE TELEPHONE NUMBER WORDZ GENERATORZ v1.0");
printf("\n**************************************** **************************************");
printf("\n**************************************** **************************************\n\n\n");
int i,j;
char input[8];
char output[1];
char current_char;
printf("Enter The Name (Must be in 8 characters): \n\n\n");
for(i=0;i<8;i++)
{
scanf("%c",&input[i]);
}
printf("The Telephone Number Are:");
for (i=0; (current_char = input[i]) != 0;i++)
{
if (current_char >= 'A' && current_char <= 'Z')
output[i] = current_char - 'A';
else if (current_char >= 'a' && current_char <= 'z')
output[i] = to_num_table[current_char - 'a'];
else output[i] = current_char;
}
output[i] = 0;
puts(output);
getchar();
system ("pause");
return (0);
}
