import java.util.Scanner;
public class Aa ;
public Aa(){}
public static void main(String[] args) {
Aa aa=new Aa();
Scanner scan=new Scanner(System.in);
String a=scan.next();
char A=a.charAt(0);
char B=(char) (A+32);
System.out.print(B);
}
}
#include
#include
void main()
{
char word;
printf("输入一个大写字母:");
scanf("%c",&word);
if(word>=65 && word<=90){
word += 32;
printf("对应小写字母为:%c \n",word);
}else{
printf("Error:输入的不是大写字母,请重新输入!\n");
}
}
程序结果如下: