Advertisement
finderabc

Bitcoin

Jul 6th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. package test10_03;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Bitcoin {
  6.     public static void main(String[] agrs) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int a = Integer.parseInt(scanner.nextLine());
  10.         int b = Integer.parseInt(scanner.nextLine());
  11.         int max = Integer.parseInt(scanner.nextLine());
  12.  
  13.         int counter = 0;
  14.         int m = 33;
  15.         int n = 58;
  16.  
  17.         for (int k = 1; k <= a; k++) {
  18.             for (int i = 1; i <= b; i++) {
  19.                 if (counter >= max) {
  20.                     break;
  21.                 }
  22.                 if (m > 47) {
  23.                     m = 33;
  24.                 }
  25.                 if (n > 64) {
  26.                     n = 58;
  27.                 }
  28.                 String newCode = (char) m + "" + (char) n + "" + k + "" + i + (char) n + "" + (char) m;
  29.                 System.out.print(newCode + "|");
  30.                 m++;
  31.                 n++;
  32.                 counter++;
  33.             }
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement