Question: I need this code to not display like this when run: [ 0 , 6 0 , 8 0 , 0 , 0 , 0

I need this code to not display like this when run:
[0,60,80,0,0,0,0,0,0,0]
It should look like this:
"Welcome to the NOAA Weather Tracker.
Menu Options
1) Input new daily weather data
2) Display all recorded weather data
3) Display recorded weather data sorted by temperature
4) Search recorded weather data for wind speed
5) Quit Application
Please select a menu option: 3
Sorted Weather Data Table [by Temperature]
Day Wind Speed (mph) Daily Temperature (F)
15060
23080"
Here is the "option 3" section of my code:
else if (n ==3){
for (int j =1; j < i; j++){
for (int h =1; j < i -1; j++){
if (temp[h +1]< temp[h]){
int some = temp[h];
j = temp[h +1];
temp[h +1]= some;
}
}
}

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 Databases Questions!