forked from CPU-Code/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBc28.java
More file actions
44 lines (39 loc) · 1.02 KB
/
Copy pathBc28.java
File metadata and controls
44 lines (39 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.cpucode.java.simple;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* 题目描述
* 实现字母的大小写转换。多组输入输出。
* 输入描述:
* 多组输入,每一行输入大写字母。
* 输出描述:
* 针对每组输入输出对应的小写字母。
* 示例1
* 输入
* A
* B
* 输出
* a
* b
* 备注:
* 多组输入过程中要注意“回车”也是字母,所以要“吸收”(getchar())掉该字母。
*
* @author : cpucode
* @Date : 2021/1/18
* @Time : 9:58
* @Github : https://github.com/CPU-Code
* @CSDN : https://blog.csdn.net/qq_44226094
*/
public class Bc28 {
public static void main(String[] args) throws IOException {
test1();
}
private static void test1() throws IOException{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String str = null;
while((str = bf.readLine()) != null){
System.out.println(str.toLowerCase());
}
}
}