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

Which sedimentary rock has the coarsest grain?
clarence measures the diameter of each tennis ball in a bag with a standard ruler. unfortunately, he uses the ruler incorrectly so that each of his measurements
which has eukaryotic plant cells
Estudiar (to study),hablar(to speak),escuchar(to listen), mirar(to look at),participar(to participate),necesitar(to need),entregar(to turn in),tarbajar(to work)
How do you explain how you found 1,700,000×1/10
Choose one of the expressed powers of Congress and explain why it is important
What is the value of the 8th term of the sequence 4,8,16,32,...? 1,024 512 128 2,048 Help please !!
Which expression represents the phrase, "one third the sum of 12 and a number"?
A ___ is used to show relationships between two variables
Simplify 659/8 . What is the answer rounded to the nearest whole number? 82 83 84