In a Matlab text by Gilat a problem presents the relationship between temperatures in New York…

In a Matlab text by Gilat a problem presents the relationship between temperatures in New York City and Denver, Colorado during the month of January, 2014. According to the U.S. National Oceanic and Atmospheric Administration, the January Fahrenheit high temperatures for New York City and Denver, Colorado were:

Date

New York City Temperature

(degrees Fahrenheit)

Denver Temperature

(degrees Fahrenheit)

1

33

39

2

33

48

3

18

61

4

29

39

5

40

14

6

55

37

7

19

43

8

22

38

9

32

46

10

37

39

11

58

55

12

54

46

13

51

46

14

52

39

15

45

54

16

41

45

17

45

52

18

39

52

19

36

62

20

45

45

21

33

62

22

18

40

23

19

25

24

19

57

25

28

60

26

34

57

27

44

20

28

21

32

29

23

50

30

30

48

31

39

28

Create a new project in Visual Studio. Then create a text file inside the project with three columns, with dates in the first column, with New York temperatures in the second column, and with corresponding Denver temperatures in the column on the right. (You can probably copy and paste values from this assignment document into the text file.) Include the number 31 as the first entry in your data file. Do not include column labels in the data file. Save the file in the project folder.

In the program, declare arrays for dates, New York temperatures, and Denver temperatures with 31 elements each (the maximum number of dates in any month) as well as other necessary variables. Declare pointers to files for input and output. Open the input file for reading and check to make sure it opened successfully. Also, open the output file for writing and check to see that the output file opened successfully.

Read in the number of days in the month. Then read in each line of data into the three arrays, using a for loop. Your loop counter (array subscript) will start with the value 0 and continue until the number of days -1 is reached.

Note: You could also read values in using a while loop in which case you would not include the number 31 at the beginning of the file. The while header line would look something like this:

while((fscanf(fpIn, “%d%d%d”, &day[k] , &NY[k], &DEN[k])) == 3) since there are 3 conversions per line.

Using separate for loops for each calculation below, after all the temperatures have been read in, calculate the following (do not determine by inspection). Do not do all the calculations in the same loop. Place a comment at the beginning of each loop explaining the goal of each loop and how it is being satisfied. All results are to be written to an output file (not to the black screen).

a. Determine in a for loop the sum of temperatures for the month in New York and the sum of temperatures for the month in Denver. Outside of this loop, find the average temperature in each city for the month, and print the averages to your output file.

b. Find and print to your output file the number of days the temperature was above average in each city.

c. Find and print to the output file the highest temperature in New York and the date on which it occurred.

d. Find and print the dates on which the temperature in New York was greater than the temperature in Denver. These dates can be printed from the loop in which they are determined.

All outputs should be written to your output file. Close the files at the end of the program. Submit the output file along with with your .c file to Canvas. This program can be done completely in function main.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Online Academic Experts
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Nursing
thank you so much
Customer 452749, June 10th, 2021
Economics
Nice work
Customer 453185, May 21st, 2022
Human Resources Management (HRM)
Very well written and very impressed with this service!
Customer 453077, February 16th, 2022
Literature
Thank you!
Customer 453145, April 19th, 2022
Social Work and Human Services
Although it took 2 revisions I am satisfied but I did receive it late because of that.
Customer 452603, March 25th, 2021
Business Studies
Thank you so much! I had to take my dog to the ER and had no time for the assignment. I really appreciate your help! I can't thank you enough! I really appreciate the work and integrity put into it. Thank you for taking it seriously and not bullshiting the paper.
Customer 452815, July 26th, 2021
History
Looks great and appreciate the help.
Customer 452675, April 26th, 2021
English 101
IThank you
Customer 452631, April 6th, 2021
Psychology
Received before the deadline. Great job!
Customer 453027, January 15th, 2022
English 101
very good paper thank you.
Customer 453083, February 18th, 2022
Humanities
Thank youuuu
Customer 452729, May 30th, 2021
Business Studies
Amazing!
Customer 452985, November 11th, 2021
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
AllEscortAllEscort
Live ChatWhatsApp
AllEscort