Advertisement
nevenailievaa

14. Password Generator

Mar 6th, 2024
2,238
0
Never
1
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.  
  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 (int k = 97; k < 97 + l; k++) {
  13.                     for (int m = 97; m < 97 + l; m++) {
  14.                         for (int o = 1; o <= n; o++) {
  15.                             if (o > i && o > j) {
  16.                                 System.out.printf("%d%d%c%c%d ", i, j, k, m, o);
  17.                             }
  18.                         }
  19.                     }
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement