Reference: Wind Speed (MPH) Category <74 Tropical Storm 74 - 95 Category 1 96 - 110 Category 2 111 - 130 Category 3 131 - 155 Category 4 >155 Category 5 |
|
|
Expected Output: Month Name Year Max Winds(mph) Classification ===== ==== ==== ============== ============== January Pali 2016 100 Category 2 February Ekeka 1992 115 Category 3 ... ... December Omeka 2010 60 Tropical Storm |
|
|
againtry provides the correct solution |
|
|
Not quite. |
|
|
0 Tropical Storm 1 Tropical Storm 2 Tropical Storm 3 Tropical Storm 4 Tropical Storm 5 Tropical Storm 6 Tropical Storm 7 Tropical Storm 8 Tropical Storm 9 Tropical Storm 10 Tropical Storm 11 Tropical Storm 12 Tropical Storm 13 Tropical Storm 14 Tropical Storm 15 Tropical Storm 16 Tropical Storm 17 Tropical Storm 18 Tropical Storm 19 Tropical Storm 20 Tropical Storm 21 Tropical Storm 22 Tropical Storm 23 Tropical Storm 24 Tropical Storm 25 Tropical Storm 26 Tropical Storm 27 Tropical Storm 28 Tropical Storm 29 Tropical Storm 30 Tropical Storm 31 Tropical Storm 32 Tropical Storm 33 Tropical Storm 34 Tropical Storm 35 Tropical Storm 36 Tropical Storm 37 Tropical Storm 38 Tropical Storm 39 Tropical Storm 40 Tropical Storm 41 Tropical Storm 42 Tropical Storm 43 Tropical Storm 44 Tropical Storm 45 Tropical Storm 46 Tropical Storm 47 Tropical Storm 48 Tropical Storm 49 Tropical Storm 50 Tropical Storm 51 Tropical Storm 52 Tropical Storm 53 Tropical Storm 54 Tropical Storm 55 Tropical Storm 56 Tropical Storm 57 Tropical Storm 58 Tropical Storm 59 Tropical Storm 60 Tropical Storm 61 Tropical Storm 62 Tropical Storm 63 Tropical Storm 64 Tropical Storm 65 Tropical Storm 66 Tropical Storm 67 Tropical Storm 68 Tropical Storm 69 Tropical Storm 70 Tropical Storm 71 Tropical Storm 72 Tropical Storm 73 Tropical Storm 74 Category 1 75 Category 1 76 Category 1 77 Category 1 78 Category 1 79 Category 1 80 Category 1 81 Category 1 82 Category 1 83 Category 1 84 Category 1 85 Category 1 86 Category 1 87 Category 1 88 Category 1 89 Category 1 90 Category 1 91 Category 1 92 Category 1 93 Category 1 94 Category 1 95 Category 1 96 Category 2 97 Category 2 98 Category 2 99 Category 2 100 Category 2 101 Category 2 102 Category 2 103 Category 2 104 Category 2 105 Category 2 106 Category 2 107 Category 2 108 Category 2 109 Category 2 110 Category 2 111 Category 3 112 Category 3 113 Category 3 114 Category 3 115 Category 3 116 Category 3 117 Category 3 118 Category 3 119 Category 3 120 Category 3 121 Category 3 122 Category 3 123 Category 3 124 Category 3 125 Category 3 126 Category 3 127 Category 3 128 Category 3 129 Category 3 130 Category 3 131 Category 4 132 Category 4 133 Category 4 134 Category 4 135 Category 4 136 Category 4 137 Category 4 138 Category 4 139 Category 4 140 Category 4 141 Category 4 142 Category 4 143 Category 4 144 Category 4 145 Category 4 146 Category 4 147 Category 4 148 Category 4 149 Category 4 150 Category 4 151 Category 4 152 Category 4 153 Category 4 154 Category 4 155 Category 4 156 Category 5 157 Category 5 158 Category 5 159 Category 5 160 Category 5 161 Category 5 162 Category 5 163 Category 5 164 Category 5 165 Category 5 166 Category 5 167 Category 5 168 Category 5 169 Category 5 170 Category 5 171 Category 5 172 Category 5 173 Category 5 174 Category 5 175 Category 5 176 Category 5 177 Category 5 178 Category 5 179 Category 5 180 Category 5 181 Category 5 182 Category 5 183 Category 5 184 Category 5 185 Category 5 186 Category 5 187 Category 5 188 Category 5 189 Category 5 190 Category 5 191 Category 5 192 Category 5 193 Category 5 194 Category 5 195 Category 5 196 Category 5 197 Category 5 198 Category 5 199 Category 5 Program ended with exit code: 0 |
~Not quite |
|
|
Differences: Done |
~Not quite |
I haven't told you to fuck off and do something productive by addressing the OP instead of stalking your betters. |
My only interest and concern was whether mine produced appropriate answers which it does. |
|
|
int wspd = 78;
which has no real use. Then later you call categorize(wspd);
, but this is in the wrong place and the value of "wspd" has no meaning.for (int i = 0; i < MONTHS_OF_YEAR; i++)
. Since this is a global variable that all you have to do is use.<< setw(15) << categorize(hList[i].windSpeed) << endl;
. The returned value of the function is the string that you need to print.Reference: Wind Speed (MPH) Category < 38 Tropical depression 39 - 73 Tropical Storm 74 - 95 Category 1 96 - 110 Category 2 111 - 129 Category 3 130 - 156 Category 4 > 156 Category 5 https://en.wikipedia.org/wiki/Tropical_cyclone_scales#Atlantic,_Eastern_and_Central_Pacific |
|
|
January Pali 2016 100 February Ekeka 1992 115 March Hali 1992 50 April Carmen 1980 50 May Amanda 2014 155 June Ava 1973 160 July Gilma 1994 160 August Ioke 2006 160 September Linda 1997 185 October Patricia 2015 215 November Sandra 2015 150 December Omeka 2010 60 |
Month Name Year Max Winds(mph) Classification ======== ======= ==== ============== =================== January Pali 2016 100 Category 2 February Ekeka 1992 115 Category 3 March Hali 1992 50 Tropical Storm April Carmen 1980 50 Tropical Storm May Amanda 2014 155 Category 4 June Ava 1973 160 Category 5 July Gilma 1994 160 Category 5 August Ioke 2006 160 Category 5 September Linda 1997 185 Category 5 October Patricia 2015 215 Category 5 November Sandra 2015 150 Category 4 December Omeka 2010 60 Tropical Storm |
|
|
|
|
January Pali 2016 100 Category 2 February Ekeka 1992 115 Category 3 March Hali 1992 50 Tropical Storm April Carmen 1980 50 Tropical Storm May Amanda 2014 155 Category 4 June Ava 1973 160 Category 5 July Gilma 1994 160 Category 5 August Ioke 2006 160 Category 5 September Linda 1997 185 Category 5 October Patricia 2015 215 Category 5 November Sandra 2015 150 Category 4 December Omeka 2010 60 Tropical Storm Program ended with exit code: 0 |