Advertisement
finderabc

A6_BitcoinCodeGenerator

Jun 29th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class A6_BitcoinCodeGenerator {
  4.     public static void main(String[] args) {
  5.         Scanner Console = new Scanner(System.in);
  6.         int a = Integer.parseInt(Console.nextLine());
  7.         int b = Integer.parseInt(Console.nextLine());
  8.         int maxCodes = Integer.parseInt(Console.nextLine());
  9.  
  10.         char i = 32;
  11.         char j = 57;
  12.  
  13.         int count = 0;
  14.         for (int k = 1; k <= a; k++){
  15.             for (int l = 1; l <= b; l++){
  16.                 i ++;
  17.                 j ++;
  18.                 if (i > 47) i = 33;
  19.                 if (j > 64) j = 58;
  20.                 count ++;
  21.                 System.out.printf("%s%s%s%s%s%s|", i, j, k, l, j, i);
  22.                 if (count == maxCodes) return;
  23.  
  24.                     }
  25.                 }
  26.  
  27.             }
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement