黑马程序员技术交流社区

标题: 五一技术分大派送之一 [打印本页]

作者: 王震阳老师    时间: 2014-4-30 11:23
标题: 五一技术分大派送之一
本帖最后由 王震阳 于 2014-4-30 11:25 编辑

五一即将到来,在此祝所有的童鞋们节日快乐,回答问题,获取技术分。回复领题吧,题目如下(回复可见)   
该题目,回答正确根据代码质量最高可获取2个技术分。


作者: Kelvinhu    时间: 2014-4-30 11:29
我看看···
作者: jieyu90    时间: 2014-4-30 11:36
先领题,后拿分,ou了
作者: 未发光的金子    时间: 2014-4-30 11:37
来看看!!!
作者: Kelvinhu    时间: 2014-4-30 11:38
本帖最后由 Kelvinhu 于 2014-4-30 12:19 编辑

答案.rar (508 Bytes, 下载次数: 5)

作者: 未发光的金子    时间: 2014-4-30 11:44
  1. public class Text11 {
  2.         public static void main(String[] args) {
  3.                 // TODO Auto-generated method stub
  4.                 int abcCount=0;//英文字母个数
  5.                 int spaceCount=0;//空格键个数
  6.                 int numCount=0;//数字个数
  7.                 int otherCount=0;//其他字符个数
  8.                 Scanner scan=new Scanner(System.in);
  9.                 String str=scan.nextLine();
  10.                 char[] ch = str.toCharArray();
  11.                 System.out.println("请输入一行字符,以回车结束");
  12.                 for(int i=0;i<ch.length;i++){
  13.                         if(Character.isLetter(ch[i])){
  14.                                 //判断是否字母
  15.                                 abcCount++;
  16.                         }
  17.                         else if(Character.isDigit(ch[i])){
  18.                                 //判断是否数字
  19.                                 numCount++;
  20.                         }
  21.                         else if(Character.isSpaceChar(ch[i])){
  22.                                 //判断是否空格键
  23.                                 spaceCount++;
  24.                         }
  25.                         else{
  26.                                 //以上都不是则认为是其他字符
  27.                         otherCount++;
  28.                         }
  29.                 }
  30.                 System.out.println("字母个数:"+abcCount);
  31.                 System.out.println("数字个数:"+numCount);
  32.                 System.out.println("空格个数:"+spaceCount);
  33.                 System.out.println("其他字符个数:"+otherCount);
  34.         }
  35. }
复制代码

作者: jieyu90    时间: 2014-4-30 11:56
本帖最后由 jieyu90 于 2014-4-30 12:01 编辑
  1. package com.itheima;

  2. import java.util.*;

  3. public class Test11 {
  4.         public static void main(String[] args) {
  5.             int m = 0; //英文字母的个数
  6.             int n = 0; //空格的个数
  7.             int p = 0; //数字的个数
  8.             int q = 0; //其他字符的个数
  9.             
  10.             Scanner in = new Scanner(System.in);
  11.             System.out.print("请输入一行字符:");
  12.             String str = in.nextLine();
  13.             in.close();
  14.             
  15.             for(int i=0;i<str.length();i++)
  16.             {
  17.               char ch = str.charAt(i);
  18.               if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z')){
  19.                  m++;
  20.               }
  21.               else if(ch==' '){
  22.                  n++;      
  23.               }
  24.               else if(ch>='0'&&ch<='9'){
  25.                  p++;   
  26.               }
  27.               else{
  28.                  q++;
  29.               }
  30.             }

  31.             System.out.println("英文字母的个数是:"+m);
  32.             System.out.println("空格的个数是:"+n);
  33.             System.out.println("数字的个数是:"+p);
  34.             System.out.println("其他字符的个数是:"+q);
  35.         }

  36. }
复制代码
这个代码质量主要看什么啊?格式?

作者: ben_vs_cong    时间: 2014-4-30 12:07
来看看题目
作者: 2528870651    时间: 2014-4-30 12:27
先看题,在回答啊 。哈哈  好激动
作者: iloveyou    时间: 2014-4-30 12:32
呵呵,好吧,
作者: 微笑=.一瞬间    时间: 2014-4-30 12:38
看看 自己能不能做出来
作者: 观决    时间: 2014-4-30 12:46
看看看看看
作者: 微笑=.一瞬间    时间: 2014-4-30 12:59
/*
        题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数
*/
import java.io.*;
class MyAnswer
{
        public static void main(String[] args)
        {
                int eNum=0;    //英文字符个数,初始为0
                int spaceNum=0;  //空格数,初始为0
                int nNum=0;   //数字数,初始为0
                int elseNum=0;   //其他字符数,初始为0
                String englishReg="[a-zA-z]";  //比较字符是否是英文的正则表达式
                String nReg="[0-9]";   //比较字符字符是否是数字的正则表达式
                //定义一读取流读取键盘录入的数据
                BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
                try
                {
                        //是用于接收键盘录入的字符串
                        String s=buf.readLine();
                        //遍历字符串每次截取长度为1的字符串 于相应的正则比较 如果为真,则相应的字符数+1
                        for(int i=0;i<s.length();i++)
                        {
                                String sub=s.substring(i,i+1);
                                if(sub.matches(englishReg))
                                        eNum++;
                                else if(sub.equals(" "))
                                        spaceNum++;
                                else if(sub.matches(nReg))
                                        nNum++;
                                else
                                        elseNum++;
                        }
                }
                catch (Exception e)
                {
                }
                //输出
                System.out.println("英文字符数:"+eNum);
                System.out.println("空格数:"+spaceNum);
                System.out.println("数字数:"+nNum);
                System.out.println("其他字符数:"+elseNum);

        }
}
结果图:


ee.png (2.53 KB, 下载次数: 287)

ee.png

作者: 张旭峰    时间: 2014-4-30 13:03
回复可见。。。。
作者: 观决    时间: 2014-4-30 13:04
  1. /*
  2. 题目:输入一行字符,
  3. 分别统计出其中英文字母、空格、数字和其它字符的个数。
  4. */
  5. import java.util.*;
  6. class  Demo
  7. {
  8.         public static void main(String[] args)
  9.         {
  10.                 stop:     //遇到over结束(当然你要测试的数据不是over啦)
  11.                 while(true){
  12.                 Scanner sc=new Scanner(System.in);
  13.                 String line=null;
  14.                 while(sc.hasNextLine()){
  15.                              line=sc.nextLine();
  16.                                  if("over".equals(line))break stop;
  17.                                  getCount(line);    //统计函数
  18.                 }
  19.                 }
  20.         }
  21.         //统计函数
  22.         public static void getCount(String str){
  23.                 int english=0,space=0,digit=0;    //初始化变量,分别是英文字母,空格,数字的计数器
  24.                 for(int i=0;i<str.length();i++){
  25.                         if((str.charAt(i)>='a'&&str.charAt(i)<='z')||(str.charAt(i)>='A'&&str.charAt(i)<='Z')){
  26.                                 english++;
  27.                         }
  28.                         else if(str.charAt(i)>='0'&&str.charAt(i)<='9')
  29.                                 digit++;
  30.                         else if(str.charAt(i)==' ')
  31.                                 space++;
  32.                 }
  33.                 System.out.println("英文字母:"+english);
  34.                 System.out.println("数字:"+digit);
  35.                 System.out.println("空格:"+space);
  36.                 System.out.println("其他字符:"+(str.length()-english-digit-space));
  37.         }
  38. }
复制代码

作者: 宋美成    时间: 2014-4-30 13:06
看看题,顺便练练
作者: 宋美成    时间: 2014-4-30 13:09
看看题,顺便练练
作者: alucard    时间: 2014-4-30 13:17
有没搞错这还要隐藏啊!!!!

作者: 2528870651    时间: 2014-4-30 13:17
请版主指正。

Test51.rar

709 Bytes, 阅读权限: 100, 下载次数: 2


作者: 班主任-唐诗老师    时间: 2014-4-30 13:30
机不可失失不再来哦~大家踊跃参加哦~
作者: 来男.    时间: 2014-4-30 13:31
看一看..
作者: iloveyou    时间: 2014-4-30 13:43
本帖最后由 iloveyou 于 2014-4-30 14:40 编辑

import java.util.*;                                                              //引包

class Test1
{
        public static void main(String[] args)
        {        

                 Scanner in = new Scanner(System.in);
                 System.out.println("请输入一行字符串:");
               
                 String str = in.nextLine();                                                          //读取输入的字符串
                 
                 if(!str.isEmpty())                                                                        //判断字符串是否为空串
                 {  
                                 System.out.println(str);  
                 }else
                {  
                                 System.out.println("There is no text to show");  
                }  

                 
                 char ss[] = str.toCharArray();                                                          //字符串转换成字符数组
                 System.out.println(ss.length);                                                        //打印字符数组长度

                 int a=0;                                                                                        //用来存储字母的个数
                 int b=0;                                                                                        //用来存储空格的个数
                 int c=0;                                                                                        //用来存储数字的个数
                 int d=0;                                                                                        //用来存储其他字符的个数
               
                 for(int x =0 ;x<ss.length;x++)
                 {

                    if((ss[x]>='a'&&ss[x]<='z')||(ss[x]>='A'&&ss[x]<='Z'))
                        {
                          a++;
                        }
                   else if(java.lang.Character.isWhitespace(ss[x]))                               //判断字符是否为空格
                        {
                          b++;      
                        }
                   else if(ss[x]>='0'&&ss[x]<='9')
                        {
                          c++;   
                        }
                   else
                        {
                          d++;
                        }
                        
                 }
                 
                System.out.println("英文字母的个数是:"+a);
                System.out.println("空格的个数是:"+b);
                System.out.println("数字的个数是:"+c);
                System.out.println("其他字符的个数是:"+d);
        }
}


图像 5.jpg (39.16 KB, 下载次数: 46)

图像 5.jpg

作者: GGdog    时间: 2014-4-30 13:44
拿提看看
作者: NNERO    时间: 2014-4-30 13:52
必须要技术分啊!
作者: 王震阳老师    时间: 2014-4-30 13:53
NNERO 发表于 2014-4-30 13:52
必须要技术分啊!

技术分活动的目的在于监测大家基础知识学习的怎么样
作者: 倾锋落颖花    时间: 2014-4-30 13:54
好像很简单的样子:D
作者: 宋美成    时间: 2014-4-30 14:03
搞定,绝对原创,嘿嘿,嘻嘻,技术分偶

TongJi.zip

736 Bytes, 阅读权限: 50, 下载次数: 3


作者: 王震阳老师    时间: 2014-4-30 14:05
宋美成 发表于 2014-4-30 14:03
搞定,绝对原创,嘿嘿,嘻嘻,技术分偶

很好,等代码审核过后,技术分自然会送上,看看其他题目吧,这些题目都是基础知识,可以检测自己的基础掌握的怎么样
作者: 水竹    时间: 2014-4-30 14:10
看一看,得点技术分!
作者: 宋美成    时间: 2014-4-30 14:11
王震阳 发表于 2014-4-30 14:05
很好,等代码审核过后,技术分自然会送上,看看其他题目吧,这些题目都是基础知识,可以检测自己的基础掌 ...

有个注释标错了,无伤大雅~嘿嘿
作者: 倾锋落颖花    时间: 2014-4-30 14:12
老师,本题解答过程,见此贴:解答:五一技术分大派送之一,贴上运行结果。老师,如果解答正确,求送技术分哈。:P

作者: 王震阳老师    时间: 2014-4-30 14:12
宋美成 发表于 2014-4-30 14:11
有个注释标错了,无伤大雅~嘿嘿

注释错了一个没关系,整体代码正确就行
作者: 枫叶零渡    时间: 2014-4-30 14:13
来看看!!!
作者: 倾锋落颖花    时间: 2014-4-30 14:14
王震阳 发表于 2014-4-30 14:12
注释错了一个没关系,整体代码正确就行

:o哦。:hug:
作者: 张旭峰    时间: 2014-4-30 14:15
答案以附上,要分呐:D

StringTest.rar

554 Bytes, 阅读权限: 100, 下载次数: 1

在这里


作者: 班主任-张瑞利老师    时间: 2014-4-30 14:16
反正我不会  过来顶一下
作者: 陈妙俊    时间: 2014-4-30 14:19
我来看看。谢谢老师们,老师五一快乐
作者: lzhuas    时间: 2014-4-30 14:21
最后一个
作者: zfan    时间: 2014-4-30 14:24
看看题目
作者: 2528870651    时间: 2014-4-30 14:27
宋美成 发表于 2014-4-30 14:03
搞定,绝对原创,嘿嘿,嘻嘻,技术分偶

怎么思路和我一样啊 。Scanner都一样,我刚刚学到io,不会其他,就这个Scanner简单一点
不过我的先提交了,阅读权限100,你看不到。
作者: 曹冬明    时间: 2014-4-30 14:27
看看什么题
作者: z1342802487    时间: 2014-4-30 14:35
领题目了
作者: 想飞的鱼    时间: 2014-4-30 14:36
菜鸟来看看有没有俺能做的:'(
作者: luoyang316    时间: 2014-4-30 14:41
什么东西
作者: blz01003hm    时间: 2014-4-30 14:45
领题 看看
作者: 菠萝鱼    时间: 2014-4-30 14:45
第二道题我来了
作者: fei_xiong    时间: 2014-4-30 14:57
领                              
作者: yemenglin    时间: 2014-4-30 14:58
我也来瞅瞅:lol
作者: 水竹    时间: 2014-4-30 14:58
  1. import java.util.Scanner;
  2. public class CopyOfTest11 {
  3.         public static void main(String[] args) {
  4.                 int letter = 0; // 英文字母个数
  5.                 int digit = 0; // 数字个数
  6.                 int blank = 0; // 空格个数
  7.                 Scanner sc = new Scanner(System.in);
  8.                 System.out.println("请输入一个字符串。");
  9.                 String str = sc.nextLine();
  10.                 sc.close();
  11.                 // 计算
  12.                 for (int i = 0; i < str.length(); i++) // 循环计数
  13.                 {
  14.                         char c = str.charAt(i);
  15.                         if (('a' <= c && c < 'z') || ('A' <= c && c < 'Z'))// 判断是否为英文字母
  16.                                 letter++;
  17.                         if (Character.isDigit(c))// 判断是否为数字
  18.                                 digit++;
  19.                         if (c == ' ')// 判断是否为空格
  20.                                 blank++;
  21.                 }
  22.                 System.out.println("字母个数为:" + letter + "\n数字个数为:" + digit + "\n空格个数为:"
  23.                                 + blank + "\n其他字符个数为:"
  24.                                 + (str.length() - letter - digit - blank));//按要求输出
  25.         }
  26. }
复制代码

作者: 奥古斯都    时间: 2014-4-30 15:02
我看看看看
作者: blz01003hm    时间: 2014-4-30 15:22
本帖最后由 blz01003hm 于 2014-4-30 15:26 编辑

老师节日快乐 此题解答过程见此贴http://bbs.itheima.com/thread-116321-1-1.html
求加分啊
作者: 张然龙    时间: 2014-4-30 15:29
希望是我能做出来的。。还没学反射。。
作者: 展展    时间: 2014-4-30 15:35
看看看先,拿技术分
作者: WO.瘾姓埋銘    时间: 2014-4-30 15:37
看看!!!!!!!!!!!
作者: 段郎    时间: 2014-4-30 15:38
我要技术分
作者: fei_xiong    时间: 2014-4-30 15:52

我的答案

Test.rar

795 Bytes, 阅读权限: 100, 下载次数: 1


作者: idream    时间: 2014-4-30 15:59
想看看,让看看呗!!!
作者: 梁俊    时间: 2014-4-30 16:02
看看,什么东西,看看,什么东西
作者: 张治国    时间: 2014-4-30 16:05
看看啦
怎个情况

作者: xx_521    时间: 2014-4-30 16:05
领提!!!!!。
作者: 张然龙    时间: 2014-4-30 16:14
我的答案也来啦 绝对原创 。。。

答案.rar

478 Bytes, 阅读权限: 100, 下载次数: 2


作者: 张然龙    时间: 2014-4-30 16:16
震阳老大。。不知道把权限设置成100可以不?
作者: 王震阳老师    时间: 2014-4-30 16:16
张然龙 发表于 2014-4-30 16:16
震阳老大。。不知道把权限设置成100可以不?

可以
作者: 张然龙    时间: 2014-4-30 16:18
王震阳 发表于 2014-4-30 16:16
可以

好的 额呵呵
作者: 李小然    时间: 2014-4-30 16:24
五一快乐!顺便领题~
作者: Igreaterik    时间: 2014-4-30 16:27
看看题目
作者: 段郎    时间: 2014-4-30 16:40
  1. import java.util.Scanner;

  2. /**
  3. * 题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数
  4. * @author Administrator
  5. *
  6. */
  7. public class Test {
  8.         public static void main(String[] args) {
  9.                 // TODO Auto-generated method stub
  10.                
  11.                 Scanner scanner=new Scanner(System.in);
  12.                 while(true){
  13.                         int letter=0;//记录字母个数
  14.                         int num=0;//记录数字个数
  15.                         int space=0;//记录空格数
  16.                         int other=0;//记录其他字符个数
  17.                         String str=scanner.nextLine();//得到输入的一行字符串,以回车键作为分隔
  18.                         //如果输入为空则提示用户请输入字符串
  19.                         if(str==null){
  20.                                 System.out.println("输入有误,请重新输入");
  21.                         }else{
  22.                                 char[] c=str.toCharArray();
  23.                                 for(int i=0;i<c.length;i++){
  24.                                         if(c[i]>'A'&&c[i]<'z'){
  25.                                                 letter++;
  26.                                                 continue;
  27.                                         }
  28.                                         if(c[i]==' '){
  29.                                                 space++;
  30.                                                 continue;
  31.                                         }
  32.                                         other++;
  33.                                 }
  34.                                 System.out.println("英文字母数为:"+letter+"\n空格数为:"+space+"\n其他字符数为:"+other);
  35.                         }
  36.                 }
  37.                
  38.         }

  39. }
复制代码



作者: 紫幻随影-缪    时间: 2014-4-30 16:40
我看看!!
作者: 官珺伟    时间: 2014-4-30 17:00
..............................
作者: WO.瘾姓埋銘    时间: 2014-4-30 17:05
本帖最后由 WO.瘾姓埋銘 于 2014-4-30 17:17 编辑

答案                     

第一题答案.zip

804 Bytes, 阅读权限: 70, 下载次数: 1


作者: 远行的人2号    时间: 2014-4-30 17:17
还要回复才能看题啊。。。。
作者: 朱晓盼    时间: 2014-4-30 17:19
领取题目,技术分我来啦
作者: ily521125    时间: 2014-4-30 17:20
又一轮技术分强势来袭
作者: 田富丰    时间: 2014-4-30 17:24
顶起!!!!
作者: Union    时间: 2014-4-30 17:32
参加一下!
作者: Igreaterik    时间: 2014-4-30 17:40
运行过了没问题,代码的质量怎么看的?

CharDemo.rar

517 Bytes, 阅读权限: 150, 下载次数: 1


作者: NewDemo    时间: 2014-4-30 17:40
领取题目。。。。。。。。。。。。
作者: fendoubuxi    时间: 2014-4-30 17:40
试试看~
作者: 橡皮-leo    时间: 2014-4-30 17:41
先MARK~~~看题
作者: luoyilan222    时间: 2014-4-30 17:41
技术分碗里来
作者: sheng6699    时间: 2014-4-30 17:53
看看设么么
作者: hhmm665544    时间: 2014-4-30 17:54
本帖最后由 hhmm665544 于 2014-4-30 19:33 编辑

第一题答案

Test1.rar

839 Bytes, 阅读权限: 100, 下载次数: 1


作者: 付江涛    时间: 2014-4-30 17:59
看看是什么
作者: Silvester    时间: 2014-4-30 18:00
先领题,希望自己能够完成啊!
作者: Union    时间: 2014-4-30 18:05
再看一遍!
作者: @文瑞    时间: 2014-4-30 18:11
这个必须要
作者: 嗯√低调〆    时间: 2014-4-30 18:12
什么问题?
作者: 69042011    时间: 2014-4-30 18:13
回复回复
作者: sheng6699    时间: 2014-4-30 18:14
import java.util.*;
public class Demo {
        public static void main(String[] args) {
               number();
            }
                public static void number(){
               
               
                 int abcnumber=0;           //英文字母个数
                int spacenumber=0;         //空格键个数
                int intumber=0;            //数字个数
                int Othernumber=0;         //其他字符个数
                                 System.out.println("请输入字符");
                Scanner scan=new Scanner(System.in);
                String str=scan.nextLine();
                char[] ch = str.toCharArray();

                for(int i=0;i<ch.length;i++){
                 if(Character.isLetter(ch[i])){

                           abcnumber++;
                        }
                  else if(Character.isDigit(ch[i])){

                                intumber++;
                        }
                   else if(Character.isSpaceChar(ch[i])){

                                spacenumber++;
                        }
                   else{

                           Othernumber++;
                    }
                }
                System.out.println("字母个数 ="+abcnumber);
                System.out.println("数字个数="+intumber);
                System.out.println("空格个数="+spacenumber);
                System.out.println("其他字符个数="+Othernumber);

                }
}

作者: danielzyj    时间: 2014-4-30 18:21
求题目   黑马程序员
作者: Shimano    时间: 2014-4-30 18:27
看一下什么题型
作者: 无奈的年华ˊ    时间: 2014-4-30 18:28
看一下         
作者: 时光♪微凉    时间: 2014-4-30 18:28
技术分:D:lol
作者: 谜燕    时间: 2014-4-30 18:37
领取题目
作者: 邵景伦    时间: 2014-4-30 18:43
我都看看
作者: danielzyj    时间: 2014-4-30 18:47
  1. import java.util.Scanner;

  2. /*
  3. 题目一:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。
  4. */

  5. class  WuYiDemo1
  6. {
  7.         public static void main(String[] args)
  8.         {
  9.                 int wordSum = 0 ;
  10.                 int spaceSum = 0;
  11.                 int numSum = 0 ;
  12.                 int otherSum = 0;
  13.                 System.out.print("请输入要统计的字符串:");
  14.                 Scanner sc = new Scanner(System.in);
  15.                 String str = sc.nextLine();
  16.                
  17.                 for (int i = 0 ; i<str.length();i++ )
  18.                 {
  19.                         int ch = str.codePointAt(i);
  20.                        
  21.                         if (ch>=48 && ch <=57)
  22.                         {
  23.                                 numSum++;
  24.                         }
  25.                         else if (ch>=65&&ch<=90)
  26.                         {
  27.                                 wordSum++;
  28.                         }
  29.                         else if (ch>=97&&ch<=122)
  30.                         {
  31.                                 wordSum++;
  32.                         }
  33.                         else if (ch==32)
  34.                         {
  35.                                 spaceSum++;
  36.                         }
  37.                         else
  38.                                 otherSum++;

  39.                 }
  40.                
  41.                
  42.                 System.out.println("字符串中空格个数:"+spaceSum+"  "+"字母个数:"+wordSum+"  "+"数字个数:"+numSum+"  "+"其他字符个数:"+otherSum);
  43.         }
  44. }
复制代码



作者: 贾俊锋    时间: 2014-4-30 18:49
先看看,
作者: 136616244    时间: 2014-4-30 18:49
什么题目?
作者: fendoubuxi    时间: 2014-4-30 19:04
  1. package Practice;

  2. class CharacterSorter
  3. {
  4.         public static String CharacterSort(String s)
  5.         {
  6.                 int[] count=new int[4];
  7.                 char[] chs=s.toCharArray();
  8.                 for(char ch:chs)
  9.                 {
  10.                         if(ch==' ')count[0]++;
  11.                         else if ('0'<=ch&ch<='9')
  12.                                         count[1]++;
  13.                         else if(('a'<=ch&ch<='z')||
  14.                                         ('A'<=ch&ch<='Z'))
  15.                                 count[2]++;
  16.                         else
  17.                                 count[3]++;
  18.                 }
  19.                 int sum=count[0]+count[1]+count[2]+count[3];
  20.                 return "字符总数:"+sum+"个,空格数个数:"+count[0]+"个,数字个数:"
  21.                 +count[1]+"个,字母个数:"+count[2]+"个,其他字符个数:"+count[3];
  22.         }
  23.         }
  24. public class TestCharacterSorter
  25. {
  26.         public static void main(String[] args) {
  27.                 // TODO Auto-generated method stub
  28. String str=" sd  fhg ui sd 14 6SFG5434/.x,.a";
  29. System.out.println(CharacterSorter.CharacterSort(str));
  30.         }
  31. }
  32. //打印结果
  33. //字符总数:32个,空格数个数:7个,数字个数:7个,字母个数:14个,其他字符个数:4。
复制代码

作者: Teemo_Mann    时间: 2014-4-30 19:04
我来看看




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2