aneliabogeva

PasswordGenerator

Nov 27th, 2020
761
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         Integer number = Integer.parseInt(scanner.nextLine());
  7.         Integer letter = Integer.parseInt(scanner.nextLine());
  8.  
  9.         for(int i = 1; i < number+1; i++){
  10.             for(int j = 1; j < number+1; j++){
  11.                 for(char k = 'a'; k < 'a'+letter; k++){
  12.                     for(char l = 'a'; l < 'a'+letter; l++){
  13.                         for(int m = 1; m <= number; m++){
  14.                             if(m > i && m > j){
  15.                                 System.out.printf("%d%d%s%s%d ",i, j, k, l, m);
  16.                             }
  17.                         }
  18.                     }
  19.                 }
  20.             }
  21.         }
  22.  
  23.     }
  24. }
  25.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×