subject

Write a for loop to print all elements of vector hourlytemp. use num_vals to determine how many elements to print. separate elements with a comma followed by a space. the last element should not include a comma or a space. ex: if hourlytemp = {90, 92, 94, 95} print:
90, 92, 94, 95
sample program:

#include
#include
using namespace std;

int main() {
const int num_vals = 4;
vector hourlytemp(num_vals);
int i = 0;

hourlytemp. at(0) = 90;
hourlytemp. at(1) = 92;
hourlytemp. at(2) = 94;
hourlytemp. at(3) = 95;

cout < < endl;

return 0;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Why should you evaluate trends when thinking about a career path?
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing the flow of electricity. student a says that voltage is a measure of the amount of electron flow in a circuit. student b says that power is the product of voltage and current. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
You know the right answer?
Write a for loop to print all elements of vector hourlytemp. use num_vals to determine how many elem...
Questions
question
Mathematics, 06.11.2020 05:00
question
Mathematics, 06.11.2020 05:00
question
Mathematics, 06.11.2020 05:00
question
Biology, 06.11.2020 05:00
question
Mathematics, 06.11.2020 05:00
Questions on the website: 13722367