desislava_topuzakova

Untitled

Jun 6th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 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. int n = Integer.parseInt(scanner.nextLine());
  7. int l = Integer.parseInt(scanner.nextLine());
  8.  
  9. for (int i = 1; i <= n; i++) {
  10. for (int j = 1; j <= n ; j++) {
  11. for (char k = 'a'; k < 'a' + l ; k++) {
  12. for (char m = 'a'; m < 'a'+l ; m++) {
  13. for (int o = 1; o <= n; o++) {
  14. if (o > i && o > j) {
  15.  
  16. System.out.printf("%d%d%c%c%d ", i, j, k, m, o);
  17. }
  18. }
  19.  
  20. }
  21.  
  22. }
  23. }
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment