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