Guest User

Untitled

a guest
Jul 7th, 2020
18
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 n = Integer.parseInt(scanner.nextLine());
  7. int l = Integer.parseInt(scanner.nextLine());
  8. String alphabet = "abcdefghi";
  9. for (int symbol1 = 1; symbol1 < n; symbol1++) {
  10. for (int symbol2 = 1; symbol2 < n; symbol2++) {
  11. for (int k = 0; k < l; k++) {
  12. char symbol3 = alphabet.charAt(k);
  13. for (int m = 0; m < l; m++) {
  14. char symbol4 = alphabet.charAt(m);
  15. for (int symbol5 = 1; symbol5 < n; symbol5++) {
  16. if (symbol5 > symbol1 && symbol5 > symbol2) {
  17. System.out.printf("%d%d%s%s%d ", symbol1, symbol2, symbol3, symbol4, symbol5);
  18. }
  19. }
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
RAW Paste Data