Advertisement
Lyubohd

Password Generator

Feb 21st, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Demo {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int n = Integer.parseInt(scanner.nextLine());
  8.         int l = Integer.parseInt(scanner.nextLine());
  9.  
  10.         for (int i = 1; i < n; i++) {
  11.             for (int j = 1; j < n; j++) {
  12.                 for (char k = 97; k < 97 + l; k++) {
  13.                     for (char m = 97; m < 97 + l; m++) {
  14.                         for (int o = 2; o <= n; o++) {
  15.                             if (o > i && o > j) {
  16.                                 System.out.print("" + i + j + k + m + o + " ");
  17.                             }
  18.                         }
  19.                     }
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement