Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package DecemberFirst;
- import java.util.Scanner;
- public class O6SafePassGenerator {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a = Integer.parseInt(scanner.nextLine());
- int b = Integer.parseInt(scanner.nextLine());
- int max = Integer.parseInt(scanner.nextLine());
- int counter = 0;
- for (char i = 35; i <=127 ; i++) {
- for (char j = 64; j <=127 ; j++) {
- for (int k = 1; k <= a ; k++) {
- for (int l = 1; l <= b ; l++) {
- if (i>55) {
- i = 35;
- }
- if (j > 96) {
- j = 64;
- }
- System.out.printf("%s%s%d%d%s%s|", i, j, k, l, j, i);
- counter++;
- i++;
- j++;
- if (counter==max || (k== a && l == b)) {
- return;
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement