I admit it's a part of an assignment but I don't understand what the assignment require in this part. This program is supposed to read 10 numbers from the keyboard and then the application findMax will take one single command line argument. If you invoke findMax 1, it will print to the screen the largest number amongst the ten numbers. If you invoke findMax 2, it will print to the screen the second largest number amongst the ten numbers. If you invoke findMax 3, it will print to the screen the third largest number amongst the ten numbers. What does …

Member Avatar
Member Avatar
+0 forum 12

Assignment :: TwoLargestElements Complete the following program so that it computes and writes out the two largest elements in the array. So far I have this...and it just gets the largest number for both outputs..I need to change it so I get both the largest and second largest. Any help would greatly be appreciated, thanks! [CODE]import java.io.* ; class TwoLargest { public static void main ( String[] args ) throws IOException { int[] data = {3, 1, 5, 7, 4, 12, -3, 8, -2}; int largest = 0, largest2 = 0; for ( int index = 0; index < data.length; …

Member Avatar
Member Avatar
+0 forum 30

Good evening im seeking help with this program, it is in a loop that ends if a negative number is entered, I am trying to get the largest number entered in the do while loop, ive tried creating a temporal variable (temp), but I dont know where to go from there, Help please, And to make it more FUN I cant use ARRAYS!!... but still pleeeeeeeese HELP! [CODE] do{ System.out.println(" Enter a number "); ingreso = leer.nextInt(); i++; //EFFORTS TO TRY TO GET THE LARGEST NUM: sum = sum + ingreso; temp = ingreso; if(may > temp){ System.out.println("The largest number …

Member Avatar
Member Avatar
+0 forum 1

Hi Guys, I have a toshiba L300D laptop, and a couple of days ago the harddrive just gave up, i knew it had a large amount of bad sectors so luckily had all the necessary data backed up. However, i have decided that having to replace the harddrive gives me an excuse to upgrade to Windows 7. With this in mind I want to upgrade the harddrive to probably between 250GB and 500GB. Im slightly concerned however that my laptop wont support a harddrive that large. Basically, does anyone know where i can find out what the largest harddrive i …

Member Avatar
Member Avatar
+0 forum 3

The End.