Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Java1program;
- import java.util.Scanner;
- public class ShestTri {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int number = Integer.parseInt(sc.nextLine());
- for (int a = 0; a <= 9; a++) {
- for (int b = 0; b <= 9; b++) {
- for (int c = 0; c <= 9; c++) {
- for (int d = 0; d <= 9; d++) {
- for (int e = 0; e <= 9; e++) {
- for (int f = 0; f <= 9; f++) {
- if (a * b * c * d * e * f == number) {
- System.out.printf("%d%d%d%d%d%d ", a, b, c, d, e, f);
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement