Question: CHALLENGE 5.4.5: Printing vector elements separated by commas. ACTIVITY Write a for loop to print all NUM_VALS elements of vector hourly Temp. Separate elements with

CHALLENGE 5.4.5: Printing vector elements separated by commas. ACTIVITY Write a for loop to print all NUM_VALS elements of vector hourly Temp. Separate elements with a comma and space. Ex: If hourly Temp = {90, 92, 94, 95), print: 90, 92, 94, 95 Your code's output should end with the last element, without a subsequent comma, space, or newline. 406896 2611930.qx3zqy7 3 using namespace std; 4 5 int main() { 6 const int NUM_VALS = 4; 7 unsigned int i; 8 vector hourlyTemp (NUM_VALS); 9 for (i = 0; i < hourlyTemp.size(); ++i) { cin >> hourly Temp.at (i); } V* Your solution goes here */ SERANG999 10 11 12 13 14 15 16 cout << endl; 17 18 19 } return 0; 1.test passed All tests p

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Programming Questions!