zoukankan      html  css  js  c++  java
  • 请输入验证码

     1            String str11 = "abcdefghijklmnopqrstuvwxyz";
     2            String str12 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     3            String str13 = "12345678901234567890123456";
     4            System.out.println("请输入验证码:");
     5            for(int x = 1; x <= 4; x++)
     6            {
     7                Random a = new Random();
     8                Random b = new Random();
     9                Random c = new Random();
    10                Random d = new Random();
    11                int m = a.nextInt(26);
    12                int f = c.nextInt(26);
    13                int e = d.nextInt(26);
    14                int n = b.nextInt(3);
    15                if(n == 0)
    16                {
    17                    System.out.print(str11.charAt(e) + " ");
    18                }
    19                else if(n == 1)
    20                {
    21                    System.out.print(str12.charAt(f) + " ");
    22                }
    23                else if(n == 2)
    24                {
    25                    System.out.print(str13.charAt(m) + " ");
    26                }
    27            }

  • 相关阅读:
    代码1
    js中级第13天
    dom 浏览器模型
    js中级第12天
    js中级第11天
    js中级第十天
    js中级第九天
    js中级第8天
    js中级第六天
    js中级第七天
  • 原文地址:https://www.cnblogs.com/wgbs25673578/p/4872986.html
Copyright © 2011-2022 走看看