subject

/** * Write a description of class unique here. * * @author Qi Zhu * @version (a version number or a date) */ import java. util. Scanner; public class unique { public static void main( String args[]) { Scanner input = new Scanner( System. in ); // To do 1: create an array of five elements int count = 0; // number of uniques read int entered =0; // number of entered numbers while (entered < numbers. length ) { System. out. print("Enter a number: "); // To do 2: write the code to retrieve the input from user //validate the input // To do 3: write if statement that validates the input [10, 100] if () { // flags where this number already exists boolean containsNumber = false; //increment number of entered numbers entered++; /* To do 4: Compare the user input to the unique numbers in the array * using a for statement. If the number is unique, continue */ // add input to the array only if the number is not already if (!containsNumber) { // To do 5: write code to add the number to the array and increment unique items input } // end if else System. out. printf("%d has already been entered\n", number); } // end if else System. out. println("Number must be between 10 and 100"); // print the list of unique values // To do 6: Write a for loop to output unique values }// end while } // end class Unique }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
Ted wants to go out to a neighborhood park and shoot pictures of dew drops on grass. he wants to get a low-level angle of the dew drops. which support equipment should ted use? a. mini tripod b. pistol grip c. monopod d. body mount
Answers: 2
question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
How to launch an app: steps to be successful? launching an app is a great idea, but it’s not that easy as we supposed to think. the majority of mobile applications don’t generate revenue because companies aren’t ready to be competitive. referring to our experience in successfully building and launching apps we hope to you omit these difficulties. we are going to talk about ideas, marketing, testing your product, its development, distribution and support. you will learn 8 product launch stages to succeed.
Answers: 1
You know the right answer?
/** * Write a description of class unique here. * * @author Qi Zhu * @version (a version number or a...
Questions
question
Mathematics, 22.04.2020 09:53
question
Physics, 22.04.2020 09:53
question
History, 22.04.2020 09:53
Questions on the website: 13722367