Advertisement
YavorGrancharov

StupidPasswordGenerator

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