前驱、后继字符.c 238 B

123456789101112131415
  1. #include <stdio.h>
  2. int main() {
  3. char front,input,behind;
  4. scanf("%c",&input);
  5. front = input - 1;
  6. behind = input + 1;
  7. printf("%c %c %c\n",front,input,behind);
  8. printf("%d %d %d",(int)front,(int)input,(int)behind);
  9. return 0;
  10. }