编程知识 cdmana.com

Woo, how to do this? Teach me

img




Refer to the answer 1:
#include<stdio.h>#include<string.h>int main(){    char s[100];    scanf("%s", s);    for(int i=0;i<strlen(s);i++){        if(s[i]>='A'&&s[i]<='Z'){            s[i] = (26-(s[i]-'A' + 1) + 1) - 1 + 'A';        }        else if(s[i]>='a'&&s[i]<='z'){            s[i] = (26-(s[i]-'a' + 1) + 1) - 1 + 'a';        }    }    printf("%s", s);    return 0;}



Refer to the answer 2:



Refer to the answer 3:

use ASCII Just convert ,A To Z Apart, 25 individual , Just each number +25 That's it




Refer to the answer 4:

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/10/20211031203159231H.html

Tags woo teach
Scroll to Top