Advertisement
yovkovbpfps

Nested LOOPS PASSWORD GENERATOR

Apr 18th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class sz {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. int n = Integer.parseInt(scanner.nextLine());
  7. int l = Integer.parseInt(scanner.nextLine());
  8.  
  9. for (int i1 = 1; i1 <= n; i1++) {
  10. for (int i2 = 1; i2 <= n; i2++) {
  11. for (int i3 = 97; i3 < 97 + l; i3++) {
  12. for (int i4 = 97; i4 < 97 + l; i4++) {
  13. for (int i5 = 1; i5 <= n; i5++) {
  14. if (i5 > i1 && i5 > i2){
  15. System.out.printf("%d%d%c%c%d ",i1,i2,(char)i3,(char)i4,i5);
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement