Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class PassGen {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n_Number = Integer.parseInt(scanner.nextLine());
- int l_number = Integer.parseInt(scanner.nextLine());
- for (int i1 = 1; i1 < n_Number; i1++) {
- for (int i2 = 1; i2 < n_Number; i2++) {
- for (int i3 = 'a'; i3 < 'a' + l_number; i3++) {
- for (int i4 = 'a'; i4 < 'a' + l_number; i4++) {
- for (int i5 = 2; i5 <= n_Number; i5++) {
- if (i5 > i1 && i5 > i2) {
- System.out.printf("%1$s%2$s%3$s%4$s%5$s ", i1, i2, (char) i3, (char) i4, i5);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement