#include<stdio.h> main() { char ch; scanf("%c",&ch); if('a'<=ch<='z')printf("%c\n",ch-32); else if('A'<=ch<='Z')printf("%c\n",ch); else printf("输入错误"); return 0; }
#include <stdio.h> int main( void ) { char ch; scanf( "%c", &ch ); if( 'a'<=ch && ch<='z' ) printf( "%c\n", ch-('a'-'A') ); else if( 'A'<=ch && ch<='Z' ) printf( "%c\n", ch ); else printf( "输入错误\n" ); return 0; }