shaiqnooro9779 shaiqnooro9779
  • 21-01-2021
  • Computers and Technology
contestada

Write a java program to create and display unique three digit number using 1,2,3 and 4 also count how many three digit number are there.

Expected

123

124

---

---

431

432

Respuesta :

Jamesanny20
Jamesanny20 Jamesanny20
  • 24-01-2021

Answer:

Answered below

Explanation:

Class Unique{

public static void main(String args[]){

int myArray[] = {1, 2, 3, 4};

int newArray[];

int i;. int j; int k;

for(i = 0; i < myArray.length; I++)

for(j = 0; j< myArray.length; j++)

for(k = 0; k< myArray.length; k++){

if(i != j && j!= k && i != k ){

newArray.add(myArray[i] + myArray[j] + myArray[k]);

}

}

int count = 0;

for(int m = 0; m < newArray.length; m++){

count++;

}

System.out.print(newArray, count)

}

}

Answer Link

Otras preguntas

How many subsets will the sets have? {sheep that have eight legs }​
¿qué es la choledad?, según el concepto otorgado por el investigador Guillermo Nugent.
see ss belowspam answers will be reported​
How many numbers multiple of 3 are in the range [2,2000]?
order the following radicals from the least to greatest without using a calculator. show your reasoning[tex]2 \sqrt{6} [/tex][tex]5 \sqrt{10} [/tex][tex]4 \sqrt
If the price of a stapler increase from Rs 50 to Rs 54, find the percentage increase?
The length L of the base of a rectangle is 5 less than twice its height H. Write the algebraic expression to model the area of the rectangle.
Can I eat my cereal and than drink advil before I sleep?
[10 points] Write a program to compute the sum of digits in a number given by the user. You must use your own function to compute the sum of digits.
HELP PLEASE HURRY THANKS