ralitsa_d

StupidPasswordGenerator

Feb 4th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class StupidPasswordGenerator {
  4. public static void main(String[] args) {
  5. Scanner scan = new Scanner(System.in);
  6.  
  7. int n = Integer.parseInt(scan.nextLine());
  8. int l = Integer.parseInt(scan.nextLine());
  9.  
  10. String password = "";
  11.  
  12. for (int i = 1; i <= n; i++) {
  13. for (int j = 1; j <= n; j++) {
  14. for (int k = 'a'; k < 'a' + l; k++) {
  15. for (int m = 'a'; m < 'a' + l; m++) {
  16. for (int o = 1; o <= n; o++) {
  17. if(o > i && o > j){
  18. password = "" + i + j
  19. + Character.toString((char)k)
  20. + Character.toString((char)m) + o;
  21. System.out.print(password +" ");
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
Add Comment
Please, Sign In to add comment