Advertisement
CoineTre

05. Password Generator

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