diff --git a/src/pkg1/MasterClass.java b/src/pkg1/MasterClass.java index f4b3586..80e81ed 100644 --- a/src/pkg1/MasterClass.java +++ b/src/pkg1/MasterClass.java @@ -5,5 +5,9 @@ public static void main(String[] args) { hks.sayHello(); abcd ob2 = new abcd(); ob2.f1(); + Shambhaveee_class ss = new Shambhavee_class(); + int[] numbers; + numbers = ss.input_digit(); + ss.checking_digit(numbers); } } diff --git a/src/pkg1/Shambhavee_class.java b/src/pkg1/Shambhavee_class.java new file mode 100644 index 0000000..10b280c --- /dev/null +++ b/src/pkg1/Shambhavee_class.java @@ -0,0 +1,27 @@ +import java.util.Scanner; + +public class Shambhavee_class { + Scanner sc = new Scanner(System.in); + + int[] input_digit() { + int[] num = new int[3]; + for (int i = 0; i < 3; i++) { + System.out.println("Enter the " + (i + 1) + " digit :"); + num[i] = sc.nextInt(); + } + return num; + } + + void checking_digit(int[] numbers) { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + for (int k = 0; k < 3; k++) { + if (i != j && j != k && i != k) { + System.out.println(numbers[i] + " " + numbers[j] + " " + numbers[k]); + } + } + } + } + } + +} \ No newline at end of file