// Code derived from Stroustrup's PPP2 book// § 4.6.2 Growing a vector// -and beginning on p 120#include<iostream>#include<vector>usingstd::cout;usingstd::vector;intmain(){vector<double>v;// start off empty; that is, v has no elementsv.push_back(2.7);// add an element with the value 2.7 at end (“the back”)// of v// v now has one element and v[0]==2.7v.push_back(5.6);// add an element with the value 5.6 at end of v// v now has two elements and v[1]==5.6v.push_back(7.9);// add an element with the value 7.9 at end of v// v now has three elements and v[2]==7.9// output above variable values to console...for(doublee:v)cout<<e<<'\n';}