佬,33分,求解
查看原帖
佬,33分,求解
1168183
dddeserve楼主2024/3/7 13:01
#include<stdio.h>
#include<string.h>

int main(){
	char y[100];
	char h[100];
	scanf("%s",y);
	for(int i = 0;i<strlen(y);i++){
		if ('a'<=y[i]&&y[i]<='z'){
			y[i] = y[i]-32;
		}
		else{
			y[i] = y[i]+32;
		}
	}
	for (int i = strlen(y)-1;i>=0;i--){
		h[strlen(y) - i -1 ] = y[i];
	}
	for(int i = 0;i<strlen(h);i++){
		if ('a'<=h[i]&&h[i]<='w'||'A'<=h[i]&&h[i]<='W'){
			h[i] = h[i] + 3;
		}
		else{
			h[i] = h[i] - 21;
		}
	}
	printf("%s",h);
	return 0;
}
2024/3/7 13:01
加载中...