JAVA语言实验——转换字母(顺序结构)
Time Limit: 1000 ms
Memory Limit: 65536 KiB
Problem Description
从键盘上输入一个小写字母,然后将小写字母装换成大写字母输出!
Input
从键盘上输入一个小写字母。
Output
小写字母装换成大写字母输出。
Sample Input
a
Sample Output
A
//package test;
import java.util.*;
public class Main {
public static void main(String[] args) {
String a;
Scanner input = new Scanner(System.in);
a=input.nextLine();
System.out.println(a.toUpperCase());
input.close();
}
}
/* String a = "ABC";
system.out.println(a.toLowerCase());//abc
String b = "abc";
system.out.println(b.toUpperCase());//ABC */