Question: The code below is written to find the highest and the lowest daily temperature, as well as average temperature in June in Lund. There is

The code below is written to find the highest and the lowest daily temperature, as well as average temperature in June in Lund. There is one mistake in the code that most likely will give the wrong result, which?

load dailyJune.txt min = 0; max = 0; total = 0; for

load dailyJune.txt min = 0; max = 0; total = 0; for i=1:length (dailyJune) if dailyJune (i) < min min dailyJune (i); end if dailyJune (i) > max max= dailyJune (i); end total = total + dailyJune (i); end meanTemp = total/length (dailyJune) **************************************

Step by Step Solution

3.41 Rating (145 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The error in the code is related to how the initial values of min and max are set Heres a detailed e... View full answer

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

Document Format (2 attachments)

PDF file Icon

609971c29d500_29680.pdf

180 KBs PDF File

Word file Icon

609971c29d500_29680.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!