Hi, I just started learning c++ and I was doing fine until we hit vectors and arrays. If anyone could help me through this program and explain I would be really appreciate it!
1. Create a vector (snow) that will hold integers which represent snowfall amounts for several months.
2. Ask the user how many months they would like to record. (input 5 when the program runs)
3. Create a loop that will ask for the “Snowfall amount for month # 1: “, etc
4. Fill the vector with the amounts input by the user.
5. Keep track of the grand total of the amounts in the fill loop.
6. In a separate loop, print the snowfall amounts back out on the screen, following the same
format as in step 3.
7. Label and report the grand total after all input.
Grand total: .. inches of snow
8. Using the size function, label and report the number of months recorded.
There are ... months recorded.
9. Write the code that will remove the last snowfall amount from the vector.11. Label and report the number of months recorded.
There are now … months recorded.
10. Clear all elements from the vector.
11. Label and report the number of months recorded.
After clearing all data, there are …months recorded
Please be wary of people asking you to PM them. This forum has trolls who maliciously give bad advice to beginners, and they try to do this in private because they know they'll be called out on it in public.
Ask yourself: Why would it benefit you to have the conversation in private with one person, when you could get the collective advice of the experts here by holding it in public?