Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class magicNumbers {
- public static void main(String[] args) {
- Scanner scanner=new Scanner(System.in);
- int num=Integer.parseInt(scanner.nextLine());
- for(int x1=0;x1<=9;x1++)
- {
- for(int x2=0;x2<=9;x2++)
- {
- for(int x3=0;x3<=9;x3++)
- {
- for(int x4=0;x4<=9;x4++)
- {
- for(int x5=0;x5<=9;x5++)
- {
- for(int x6=0;x6<=9;x6++)
- {
- if(num==x1*x2*x3*x4*x5*x6)
- {
- System.out.print(x1);
- System.out.print(x2);
- System.out.print(x3);
- System.out.print(x4);
- System.out.print(x5);
- System.out.print(x6);
- System.out.print(" ");
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement