06-06
09

刚完成的简历小程序 测试无误


import java.io.*;//要添加引用

class JianliPrint
{

   public static void main (String args[])
     {
    
       String _="_____________________________________";
      
            for(int i=0;i<1000;i++)
              {
              try
                {

                 BufferedReader br=new BufferedReader (new InputStreamReader(System.in));

          
                  System.out.println("欢迎光临简历系统!");
          

                  System.out.println("请输入您的ID:");
                  String ID=br.readLine();//读输入缓冲流in
                  System.out.println(ID);
      
                  System.out.println("请输入您的姓名:");
                  String name=br.readLine();
                  System.out.println(name);
          
                  System.out.println("请输入您的性别:");
                  String sex=br.readLine();
                  System.out.println(sex);
                
                  System.out.println("请输入您的年龄:");
                  String age=br.readLine();
                  System.out.println(age);
          
                  System.out.println("请输入您的爱好:");
                  String hobby=br.readLine();
                  System.out.println(hobby);


                  System.out.println("是否需要打印?(Y/N)");
          
          
                  if("Y".equals(br.readLine()))
          
                    {

                      System.out.println(_);
                      System.out.println("ID  :"+ID+"\t|姓名:"+name+"\t|");
                      System.out.println(_);
                      System.out.println("性别:"+sex+"\t|年龄:"+age+"\t|");
                      System.out.println(_);
                      System.out.println("爱好:"+hobby);
                      System.out.println(_);

                       System.out.println("是否继续添加下一人员简历?(Y/N)");

              }
      
              else
              {
               System.out.println("欢迎再次惠顾!");
              }

                     if ("Y".equals(br.readLine()))
                     {
                          continue;
                     }
                     else
                     {
                      System.out.println("欢迎再次惠顾!");
                      break;
                     }

               }
          

             catch(Exception e)
              {}
        
       }
     }
}


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: CMD 绘表
相关日志:
评论: 0 | 引用: 0 | 查看次数: 681
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭