Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TrialExam16Dec18;
- import java.util.Scanner;
- public class Task_6 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int num = Integer.parseInt(scanner.nextLine());
- int a = num % 10;
- int temp = num - a;
- int b = (temp / 10) % 10;
- int c = num / 100;
- for (int i = 1; i <= a; i++) {
- for (int j = 1; j <= b; j++) {
- for (int k = 1; k <= c; k++) {
- int result = i * j * k;
- System.out.printf("%d * %d * %d = %d;%n", i, j, k, result);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement