Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class eLexam06_SafePasswordsGenerator {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int aX = Integer.parseInt(scanner.nextLine());
- int bY = Integer.parseInt(scanner.nextLine());
- int maxNumberPass = Integer.parseInt(scanner.nextLine());
- int A = 35;
- int B = 64;
- int counter = 0;
- for (int j = 1; j <= aX; j++) {
- for (int k = 1; k <= bY; k++) {
- counter++;
- if (counter > maxNumberPass) {
- break;
- }
- System.out.print((char) A);
- System.out.print((char) B);
- System.out.print(j);
- System.out.print(k);
- System.out.print((char) B);
- System.out.print((char) A);
- System.out.print("|");
- if (A >= 55) {
- A = 35;
- } else {
- A++;
- }
- if (B >= 96) {
- B = 64;
- } else {
- B++;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement