# Combination of Numbers coderinme

#### Combination of Numbers coderinme

Let us now code something based on numbers. Such as, We can create a kind of puzzle by jumbling some of the digits. In other words we can mix and match different digits to create different numbers in the number system.
For example : We are now going to print print all the possible combinations using the three digits – 1, 2, and 3. It is just like the numbers obtained could be 123, 231, 213, 231,132,312, 321.
Print all combination from 1 2 3

Write a program to accept three digits (i.e. 0 – 9) and print all its possible combinations.
Program:

``````import java.io.*;
public class Q14
{
public static void main(String[] args) throws IOException
{
int a[]=new int;
System.out.print("Please enter the three digit i.e(0-9): ");
for(int k=0;k<3;k++)
{
}
System.out.println("Possible combination are:");
for(int i=0;i<3;i++)
for(int j=0;j<3;j++)
for(int k=0;k<3;k++)
{
if(i!=j&&i!=k&&j!=k)
System.out.print(" "+a[i]+a[j]+a[k]);
}
}
}
`````` 