Advertisement
Dido09

PasswordGenerator

Oct 23rd, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class PassGen {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int n_Number = Integer.parseInt(scanner.nextLine());
  8. int l_number = Integer.parseInt(scanner.nextLine());
  9.  
  10. for (int i1 = 1; i1 < n_Number; i1++) {
  11. for (int i2 = 1; i2 < n_Number; i2++) {
  12. for (int i3 = 'a'; i3 < 'a' + l_number; i3++) {
  13. for (int i4 = 'a'; i4 < 'a' + l_number; i4++) {
  14. for (int i5 = 2; i5 <= n_Number; i5++) {
  15.  
  16. if (i5 > i1 && i5 > i2) {
  17. System.out.printf("%1$s%2$s%3$s%4$s%5$s ", i1, i2, (char) i3, (char) i4, i5);
  18. }
  19.  
  20.  
  21. }
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement