Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Problem07 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int num = Integer.parseInt(scan.nextLine());
- String number = num + "";
- char x1 = number.charAt(0);
- char y1 = number.charAt(1);
- char z1 = number.charAt(2);
- int x = Character.getNumericValue(x1);
- int y = Character.getNumericValue(y1);
- int z = Character.getNumericValue(z1);
- for (int i = 1; i <= z; i++) {
- for (int j = 1; j <= y; j++) {
- for (int k = 1; k <= x; k++) {
- int total = i * j * k;
- System.out.printf("%d * %d * %d = %d;%n", i, j, k, total);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement