Home > Back-end >  Program is used to make the user to enter the phone number of the letters and Numbers mixed into pur
Program is used to make the user to enter the phone number of the letters and Numbers mixed into pur

Time:09-23

# include & lt; Stdio. H>
# include & lt; Ctype. H>
Int main () {
int i=0;
Char ch;
Int letter_g;
Char letter [I];
Printf (" enter the phone number: ");
for(; (letter [I]=getchar ()!='\ n'); I++) {
For (ch='A'; Ch<='Y' Ch++) {
If (toupper (letter [I])==ch& & Ch! ) {
='Y'Letter_g=ch - 'A';
Letter [I]=letter_g * 3 + '2';
}
If (toupper (letter [I])=='Y') {
Letter [I]='9'.
}
}
}

for(int j=0; jPrintf (" % c ", the letter [j]);
}
printf("\n");
return 0;
}

CodePudding user response:

The char first letter [I] into a letter [15], let's see other problems
  • Related