Home > Back-end >  Scratchable latex input method c
Scratchable latex input method c

Time:06-07

While the condition is what ah, want to can't think for a few days? Bosses for help all of you!
#include
#include
Int main ()
{
Int a, b, I;
Char n [600].

The static char s [10] [6]={
{' 0 ', '},
{' 1 ', ', ', '. ', '? ', '! '},
{' 2 ', 'A', 'B', 'C'},
{' 3 ', 'D', 'E', 'F'},
{' 4 ', 'G' and 'H', 'I'},
{' 5 ', 'J', 'K', 'L'},
{' 6 ', 'M', 'N', 'O'},
{' 7 ', 'P', 'Q', 'R' and 'S'},
{' 8 ', 'T', 'U', 'V'},
{' 9 ', 'W', 'x', 'Y', 'Z'}
};


While (1) {
The scanf (" % s ", & amp; N);
B=n [0] - '0';
A=strlen (n);
Printf (" % c ", s [b] [1] a);
}


return 0;
}

CodePudding user response:

While (the scanf (" % s ", n)!=(EOF)

CodePudding user response:

While (the scanf (" % s ", & amp; N)!=(EOF)

CodePudding user response:

refer to the second floor wowpH response:
while (the scanf (" % s ", & amp; N)!=(EOF)
wrong topic only one input
Don't cycle input

CodePudding user response:

After enter
Iterate over the string
End of the string traversal
The output

Note that the input string to a space also want to read the string on the inside

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related