Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class PasswordGenerator {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n1 = Integer.parseInt(scanner.nextLine());
- int l = Integer.parseInt(scanner.nextLine());
- for (int i = 1; i <= n1; i++) {
- for (int j = 1; j <= n1; j++) {
- for (char k = 'a'; k < 'a'+l; k++) {
- for (char m = 'a'; m < 'a'+l; m++) {
- for (int n = 1; n <= n1; n++) {
- if (n>i && n>j){
- System.out.printf("%d%d%c%c%d ",i,j,k,m,n);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement