import java.util.Scanner;
public class Main {
public static void cs(String a){
char[] array = a.toCharArray();
int Letter=0;
int Num = 0;
int Space = 0;
int Character = 0;
for(int i=0;i<array.length;i++){
array[i] = a.charAt(i);
if(65<=array[i]&&array[i]<=90||97<=array[i]&&array[i]<=122)
Letter++;
else if(48<=array[i]&&array[i]<=57)
Num++;
else if(array[i]==32)
Space++;
else
Character++;
}
System.out.print(Letter+" "+Num+" "+Space+" "+Character);
}
public static void main(String[] arg){
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
cs(a);
}
}
0.0分
3 人评分
C语言程序设计教程(第三版)课后习题6.5 (C语言代码)浏览:660 |
C语言考试练习题_保留字母 (C语言代码)浏览:743 |
简单的a+b (C语言代码)浏览:572 |
理财计划 (C语言代码)浏览:494 |
小O的图案 (C语言代码)浏览:979 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:441 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:1390 |
哥德巴赫曾猜测 (C++代码)浏览:788 |
Manchester- A+B for Input-Output Practice (VI)浏览:2068 |
杨辉三角 (C语言代码)浏览:658 |