#include<stdio.h> #include<ctype.h> char fun(char c) { if(c>='A'&&c<='Z') c=c+32; if(c>='a'&&c<='u') c=c+5; else if(c>='v'&&c<='z') c=c-21; return c; } main() { char c1,c2; printf("\nEnter a etter (A-Z):"); c1=getchar(); if(isupper(c1)) { c2=fun(c1); printf("\n\nThe letter %c change to %c\n",c1,c2); } else printf("\nEnter (A-Z)!\n"); }
P80
时间: 2024-10-29 04:42:06