Hi, I am suppose to run a for loop into an array of 26, 6 times. The point is to gather the six largest numbers and put them in ascending order. I have been trying everything for this and cannot come up with a solution. The directions I am given say use a for loop 6 times to get the 6 biggest numbers and then use a nested loop to iterate over the entire array. If there are numbers that are the same pick the one that comes first. Pleas help me I have other exams to study for and I need to move on. :/

Recommended Answers

All 2 Replies

Also i forgot to mention the the first loop is also an array so the output can look likes this. for (int i = 0; i < array.length; i++) { the loop i cant firgure out { } array[i] = the variable from the nested loop

Can you post the code do you have for the program with your questions
or the full text of the error messages you are having problems with.

When you post code, please use code tags. See the (code) icon above the input box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.