如题:2021年4月 第30题
public class Test30_2104 {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str = br.readLine();
int i, ditNo = 0, upCharNo = 0, IoCharNo = 0, otherCharNo = 0;
for (i = 0 ; i < str.length(); i++) {
if (str.charAt(i) <= '9' && str.charAt(i) >= '0') {
ditNo++;
} else if (str.charAt(i) <= 'Z' && str.charAt(i) >= 'A') {
upCharNo++;
} else if (str.charAt(i) <= 'z' && str.charAt(i) >= 'a') {
IoCharNo++;
} else otherCharNo++;
} System.out.println("N1=" + ditNo + "\t" +
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20