Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MultiplyTable_06 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int number = Integer.parseInt(scanner.nextLine());
- int firstDigit = number / 100;
- int secondDigit = number / 10 % 10;
- int thirdDigit = number % 10;
- for (int num1 = 1; num1 <= thirdDigit ; num1++) {
- for (int num2 = 1; num2 <= secondDigit ; num2++) {
- for (int num3 = 1; num3 <= firstDigit ; num3++) {
- int result = num1 * num2 * num3;
- System.out.printf("%d * %d * %d = %d;%n", num1, num2, num3, result);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement