Coding in C++
Write a program using structures to store the following weather information:
- Month name
- Day of month (Monday, Tuesday, etc)
- High Temperature
- Low Temperature
- Rainfall for the day
Use an the input.txt file to load the data into weather structures.
Once the data for all the days is entered, the program should calculate and display the:
- Total rainfall for the data
- Average daily temperatures. (note: you'll need to calculate the days average temp for each day and use that for this)
- Highest temp recorded and the month
- Lowest temp recorded and the month
Validatation: Input temps should be between -100 and +140 and and
total rainfall must not be less than 0
input file name may be off - make sure it's input.txt
An example Output is below:
Annual Rain Analysis Total Rain: xxx.xx Average daily temps: xx.xx The highest temp is: xxx.xx in August The Lowest temp is: -xx.xx in February Press enter to continue.
Data of input.txt below:
September Monday 60.4 -7.6 3.8 |
October Saturday 49.1 3.3 4.6 |
October Saturday -82.8 -86.3 2.9 |
August Thursday 59.8 -58.8 0.9 |
September Wednesday 139.4 -75 4.7 |
May Sunday 124.3 -79.9 4.3 |
March Tuesday -23.4 -59.2 4.9 |
December Saturday 75.5 -76.7 2.6 |
July Wednesday 100.8 -66.6 4.8 |
July Wednesday 29.2 -42.4 0.2 |
April Sunday 129.5 -53.4 4.2 |
September Monday 116.5 -20.6 1.5 |
November Tuesday 116.5 50.8 3.9 |
August Thursday 73.1 -81 0.4 |
June Saturday 59.6 -68.3 2.1 |
December Thursday 38.7 1 1.8 |
September Sunday 79.5 1.4 3.2 |
August Tuesday 127.8 -3 0.6 |
June Thursday 83.4 -75.6 0 |
July Tuesday 113.2 56.3 3.1 |
November Saturday 24.9 -18.7 1.1 |
December Saturday -30.9 -73.6 4.3 |
May Sunday 63 -7.2 2.7 |
September Tuesday 37.8 -4.8 4.3 |
August Monday 98.5 -78.6 4 |
July Monday 4.8 -87.8 2.5 |
January Thursday 110.8 12.8 2.2 |
December Friday 123.8 60.3 4.6 |
July Tuesday 4.3 -56.5 0.3 |
January Saturday 16.8 12 2.5 |
November Sunday 67.5 6.5 1.3 |
August Sunday -16.6 -41.3 4.4 |
November Saturday 139.9 135.5 1 |
July Saturday 45.3 -70.7 1.9 |
October Sunday 119.7 20.2 0.4 |
June Friday -18.4 -98.2 0.2 |
January Friday 125.8 -35.8 3.9 |
February Wednesday 61 -32.5 3.4 |
November Friday 39.5 -34.9 4.2 |
May Wednesday -20.6 -80.3 0.5 |
July Saturday 117.1 -20.3 3.6 |
July Thursday 39.2 36.9 1.5 |
June Friday -30.1 -57.3 2.3 |
December Wednesday -2.6 -23.5 1.8 |
February Thursday 99.3 36.4 0 |
November Tuesday 6.7 -2.8 4.6 |
August Wednesday 87.8 6.3 2.2 |
September Saturday 131.4 -9.2 0.8 |
November Wednesday 3.2 -35.8 2.9 |
March Wednesday 65.5 -8.7 1.9 |
February Saturday 77.7 35.4 2.3 |
September Tuesday 39.5 27.1 2.5 |
June Monday -20.6 -79.8 2.3 |
April Monday 75.1 -78.9 2.5 |
October Wednesday 91.8 -67.5 4.7 |
December Saturday 131.2 37.8 1.6 |
August Monday 12 -83.4 2 |
August Tuesday 94.1 79.5 4.1 |
April Thursday 36.7 -19.7 0.4 |
March Monday 134.9 -78.4 1.2 |
October Friday 49.4 41.6 2.2 |
November Saturday 11.6 -26.5 1.9 |
November Tuesday -58 -68.3 0.5 |
August Wednesday 30.6 -72.2 2.6 |
February Tuesday 133.7 5.4 4.2 |
August Thursday 104.8 -71.9 1.5 |
April Friday 98.1 -31.3 1.6 |
September Monday 69.5 -42.8 3.1 |
September Friday -40.2 -70.7 2.4 |
February Wednesday 64.3 45.1 1.1 |
March Friday 26 -63.3 3.6 |
April Tuesday -53.7 -96.7 2.3 |
May Monday 108.3 -1.2 0.2 |
November Monday 55.3 -98.2 2.8 |
April Thursday 132.7 -62.1 4.2 |
June Wednesday 69.9 -71.2 3 |
December Tuesday 104.8 -83.6 3.5 |
November Sunday 99.1 72.1 2.8 |
December Saturday 55.9 27.2 3.4 |
February Thursday 70.7 28.4 4.2 |
January Wednesday -30.3 -59.5 0.1 |
April Tuesday -38.4 -90.3 1.4 |
January Tuesday 90.7 -18.2 2.1 |
August Sunday 53.6 35.6 1.3 |
June Monday 94.3 44.2 1.1 |
September Saturday 56.3 -94 0.1 |
July Friday 94.4 -62.1 2.1 |
June Monday 65.4 58.5 1.6 |
June Tuesday 125.5 90.8 2.2 |
August Friday 91.5 -17.7 0.1 |
November Saturday 83.5 -60.2 3.2 |
February Tuesday 100.3 64.1 0.5 |
May Sunday -0.5 -76.2 0.4 |
October Tuesday 107 -24 3.7 |
May Tuesday 139.2 -65.1 3.3 |
April Wednesday 115.9 14.9 4.7 |
January Thursday 35.1 -98.7 1.7 |
January Wednesday 65.1 6.9 0 |
January Sunday 130.5 -94.6 2.9 |
February Sunday -63.5 -64.2 1.6 |
February Thursday 34.1 -1 4.6 |
November Wednesday 99.1 -12.3 1.8 |
February Wednesday 29.8 -38.4 4.3 |
June Wednesday 137.2 -29.4 1.8 |
January Monday 139.3 42.9 4.1 |
January Sunday 99.8 -49.3 0.1 |
July Monday 50.9 -7.8 1.5 |
July Friday 20.4 -11.7 2.7 |
January Sunday 25.1 -61.9 4.3 |
February Thursday 26.8 23.9 3.4 |
October Thursday -56 -96 1.6 |
March Saturday 38 27 4.2 |
March Thursday 120.3 30.2 3.5 |
September Thursday 77.5 49.1 4 |
October Wednesday 83.8 -90.5 0.4 |
August Saturday -35.1 -78 1.7 |
March Monday 78.8 69.9 2.4 |
August Sunday 83.3 25.7 1.7 |
March Thursday 3.2 1.3 3.3 |
September Tuesday 58 33.4 1.7 |
July Thursday 19.5 -30.9 2.7 |
March Saturday 77 28.7 1.2 |
April Friday 0 -54.3 3.8 |
December Thursday 111.2 46.3 3 |
June Thursday 23.1 21.7 4.2 |
July Thursday 1.2 -86.3 2.8 |
December Monday 131.8 65 4 |
May Wednesday 81 2.3 2.9 |
December Sunday -42 -45.6 3.7 |
December Thursday 58.2 22.4 0 |
September Thursday 84.2 76.4 3.4 |
April Sunday 129.5 -58.1 2.7 |
January Saturday -19.9 -51.7 2.8 |
February Friday 84.8 -23.2 1.9 |
May Friday 40.3 -59.9 2.9 |
June Tuesday 120.1 -36.8 4.2 |
March Thursday -28.2 -51.7 3.6 |
February Sunday 86.8 21.6 1.9 |
June Monday 120.9 72.4 3.6 |
December Monday 138.4 -27.5 1.4 |
May Friday 73.2 -20.4 1 |
August Friday 66.2 -95.7 1.4 |
May Wednesday 58.7 -76.2 1.4 |
January Saturday 100.3 23.5 1.1 |
January Wednesday 71.1 -84.7 4.8 |
November Sunday 109 -43 1 |
February Tuesday 9 -33 0.9 |
June Wednesday 97.3 -91.9 4.6 |
January Tuesday -42.2 -77.3 2.9 |
September Sunday 6 -89.6 1 |
March Saturday -1.8 -55.5 3.6 |
August Sunday 135.2 -17.4 4.5 |
May Thursday 62.7 -89.3 4.5 |
December Wednesday 138 -40.1 1.3 |
December Wednesday 87 57.2 2.5 |
January Monday -51.9 -86.8 1 |
November Sunday -23.8 -85.4 2.5 |
May Saturday 78.7 -87.7 3.2 |
May Wednesday -12.2 -64.5 2.7 |
June Monday 127.7 -41.3 0.4 |
July Friday 43.5 -93.4 2 |
December Sunday 85 -69.2 2.3 |
March Wednesday 93 48.8 1.4 |
July Tuesday -65.7 -79.9 3.8 |
September Monday 43.2 -66.9 2.9 |
March Friday -29.8 -33.9 0 |
December Monday 113.1 3.8 1.8 |
April Sunday 139.8 89.2 3.5 |
August Saturday 45.1 26.4 1.5 |
October Friday -30.8 -99.2 1.3 |
February Wednesday 75.2 -64.4 1.9 |
April Thursday 55.3 -39.5 2.9 |
August Friday 28.8 0.2 1.5 |
November Thursday 99.4 53.5 1.2 |
October Saturday 30.9 -64.6 4.9 |
March Monday 120.2 112.2 1.4 |
November Saturday 118.3 -1.4 0.5 |
June Thursday 78.5 -32.4 2.7 |
August Friday 104 20.9 2.9 |
January Saturday 23.4 -66.8 2.9 |
August Tuesday 121.9 64.7 0.7 |
August Monday 31.1 -72.3 4.7 |
June Saturday -65.7 -92.4 0.6 |
August Friday -45.1 -83 1.1 |
January Wednesday 35.3 22 4.1 |
September Sunday 138.4 -50.9 0 |
June Wednesday 114.8 -83.2 2.1 |
June Tuesday 62.5 -55.5 2.2 |
March Monday 52.4 -87.4 2.8 |
March Wednesday 106.9 -27.6 0.8 |
August Saturday 47.2 -1.5 3.8 |
July Friday 50.6 -27.4 3.5 |
October Sunday 65.9 -97.8 2.9 |
August Sunday 117.5 7.9 4.5 |
November Friday 66.6 -69.4 0.5 |
December Tuesday 7.1 -96.1 3.8 |
September Tuesday 108 25.9 3.6 |
June Tuesday 48.4 -51.2 1.6 |
February Saturday -3.3 -32.7 1.1 |
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
Coding in C++ Write a program using structures to store the following weather information: - Month...
JANUARI FEBRUARY • MARCH . APRIL . MAY JUNE JULY AUGUST . SEPTEMBER • OCTOBER NOVEMBER MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY SUNDAY are coking of Tell how. you. going to mentioned Problem focused Emotion. focused coking Physio logical reactions Psychological reactions New age..
SQL - Microsoft Access --------------------------------------------------------------------- SQL- Microsoft Access List the employee number, employee last name, and pilot license type (if any) for all employees. (Hint: LEFT oUTER JOIN or OUTER JOIN must be used, because "if any"-some of them are not pilots). EMP NUM EMP TITLE EMP LNAME EMP FNAME EMP INITIAL EMP DOB EMP HIRE_DATE Click to Add 100 Mr 101 Ms. 102 Mr 103 Ms. 104 Mr 105 Mr 106 Mrs 107 Mr 108 Mr 109 Ms. 110...
PYHTON Try! Consider a dictionary for the month months Dictionary = { 1 : "January", 2 : "February", 3 : "March", 4: "April", 5 : "May", 6 : "June", 7 : "July", 8: "August", 9 : "September", 10 : "October", 11: "November", 12 : "December" } . Prints out all the items, both key and value, in the dictionary Prints out all the keys in the dictionary Prints out just the values in the dictionary Loops though using the keys...
Using the function you wrote in part 3a (refer to the bottom), write another function that, given the number of days in the month, and the day that the month starts on, the number of days that Inky Blinky Pinky and Clyde will get to play pinball in that month. The function provided will increment the day of the week to the next correct day. Function written in 3a): def pinball(dayOfWeek, dayOfMonth) : if dayOfMonth % 4 ==0: return "Pinky"...
USING PYTHON. (Science: day of the week) Zeller’s congruence is an algorithm developed by Christian Zeller to calculate the day of the week. The formula is h = (q + 26(m+1)//10 + k + k//4 +j//4 +5j) % 7 where - h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday). - q is the day of the month. - m is the month (3: March, 4: April, ...,...
1. Using and exponential smoothing model, the forecast for next January sales is: Sales January 100 February 200 March 150 April 400 May 300 June 200 July 250 August 350 September 400 October 350 November 400 December 500 a. 150.0 b. 477.3 c. 450.0 d. Not enough information is given to make a forecast 2. Apply regression to the data shown below. The slope of the line estimated using the regression model is: Sales January 100 February 200 March 150...
using R program. please show everything The following data concerns monthly sales of an electronic device for the last year a) Plot sales (y) versus time (t). Is it reasonable to use a least squares trend line to relate y tot b) Use a least squares trend line to predict calculator sales for the next three months (January, February, and March of the next year). Device sales, y Month January February 197 211 March 203 April May June 247 239...
PHP code for a calendar using control structures Design Overview and Requirements As part of the first submission point, you should generate a static calendar for the current month. The current month used for the header and display can be determined in your code by using the date () function. To be eligible for grading you should construct the calendar using one or more control structures nested inside a calendar php script file. An example of how the calendar may...
Demand 21,520 Period September 2018 October 201823,670 November 2018 December 2018 Period Demand 22,820 March 2018 April 2018 May 2018 23,280 24,490 24,810 June 2018 22,370 25,250 July 2018 August 2018 What is the forecast demand for March 2019 considering trend and seasonality? January 2019 25,990 February 2019 24,260 19,940 20,860 Demand 21,520 Period September 2018 October 201823,670 November 2018 December 2018 Period Demand 22,820 March 2018 April 2018 May 2018 23,280 24,490 24,810 June 2018 22,370 25,250 July 2018...
I need to write a program in java using two array lists. I need to program to prompt the user to enter a day of the week and return an output of a predetermined temperature for the day they selected. I also need the program the output the average of daily temperatures across the week if the user inputs "week". So basically if i set the temperatures to something arbitrary i.e.: Monday = 50 Tuesday = 55 Wednesday = 52...