Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class BankAccauntGenerator {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a = Integer.parseInt(scanner.nextLine());
- char b = scanner.nextLine().charAt(0);
- char c = scanner.nextLine().charAt(0);
- char d = scanner.nextLine().charAt(0);
- int e = Integer.parseInt(scanner.nextLine());
- int n = Integer.parseInt(scanner.nextLine());
- String pass = "";
- int i = 0;
- for (int first = a; first <= 99; first++) {
- for (int second = e; second > 10; second--) {
- if (first % 10 == 2 && second % 10 == 5) {
- i++;
- for (char third = b; third <= 'Z'; third++) {
- i++;
- for (char fourth = c; fourth <= 'z'; fourth++) {
- i++;
- for (char fifth = d; fifth <= 'Z'; fifth++) {
- i++;
- pass = "" + first + third + fourth + fifth + second;
- if (i == n) {
- System.out.println(pass);
- break;
- }
- }
- }
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment