Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago