#include <stdio.h> int main() {//使用数组 char a[3]; for (int i = 0; i < 3; i++) { a[i] = getchar(); } char b = a[0]; a[0] = a[2]; a[2] = b; printf("%c%c%c", a[0], a[1], a[2]); return 0; }
#include <stdio.h> int main() {//使用数组 char a[3]; for (int i = 0; i < 3; i++) { a[i] = getchar(); } char b = a[0]; a[0] = a[2]; a[2] = b; printf("%c%c%c", a[0], a[1], a[2]); return 0; }