Advertisement
Guest User

StupidpasswordGenerator

a guest
Feb 22nd, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4.  * Created by Jo on 2/22/2017.
  5.  */
  6. public class StupidPasswordGenerator {
  7.     public static void main(String[] args) {
  8.         Scanner console = new Scanner(System.in);
  9.         int countNumber = Integer.parseInt(console.nextLine());
  10.         int countChar = Integer.parseInt(console.nextLine());
  11.  
  12.         for (int i = 1; i < countNumber; i++) {
  13.             for (int j = 1; j < countNumber; j++) {
  14.                 for (char ch1 = 'a'; ch1 < 97 + countChar; ch1++) {
  15.                     for (char ch2 = 'a'; ch2 < 97 + countChar; ch2++) {
  16.                         for (int k = Math.max(i, j) + 1; k <= countNumber; k++) {
  17.                             System.out.printf("%d%d%c%c%d ", i, j, ch1, ch2, k);
  18.                         }
  19.                     }
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement