Question: Modify the following java program to have the flowing output: Documentation: 10 points Exact output: 30 points Modified/added/edited code: 60 points arraySearch-3.java Hint: needs

Modify the following java program to have the flowing output: Documentation: 10

Modify the following java program to have the flowing output: Documentation: 10 points Exact output: 30 points Modified/added/edited code: 60 points arraySearch-3.java Hint: needs a do-while! ==>> Array Search program Enter a number to search for: 2 found it! :) Enter any number to continue or number 0 to exit: 5 =>> Array Search program Enter a number to search for: 6 Sorry not found it! :( Enter any number to continue or number 0 to exit: 0 ==> End of the Search Program! Choose /* *Array Search package int2200.week7; import java.util.Scanner; public class arraySearch { public static void main(String[] args) { // create and initializ an arry int[] numbers = {2, -9, 0, 5, 12, 25, 22, 9, 8, 12}; int key; boolean foundit = false; // declare a vraiable and initialize it to false Scanner input = new Scanner(System.in); // Create a Scanner object System.out.println("=>> Array Search program "); System.out.print ("Enter a number to search for: "); key = input.nextInt(); // access all elements using for each loop for (int i=0; i < numbers.length; i++) { if (key == numbers [i]){ } foundit=true; if (foundit == true){ System.out.println("found it! :)"); }else { } System.out.println("Sorry notfound it! :("); System.out.println("==> End of the Search Program "); } 1 =>> Array Search program Enter a number to search for: 2 found it! :) >End of the Search Program "/ C Q Search Bing $ 64 #3 E R LL D 75 % L 96 T Y &7 * 8 U 61 ) 0 O F P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!