// Code derived from Stroustrup's PPP2 book// § 5.7 Logic errors// -and beginning on p 154#include<iostream>#include<vector>usingstd::cin;usingstd::cout;usingstd::vector;intmain(){cout<<"Please enter temperatures: (enter '|' to stop):\n";vector<double>temps;// temperaturesfor(doubletemp;cin>>temp;)// read and put into tempstemps.push_back(temp);//doublesum=0;doublehigh_temp=0;doublelow_temp=0;for(intx:temps){if(x>high_temp)// record highhigh_temp=x;////if(x<low_temp)// record lowlow_temp=x;//sum+=x;// compute sum}cout<<"High temperature: "<<high_temp<<'\n';cout<<"Low temperature: "<<low_temp<<'\n';cout<<"Average temperature: "<<sum/temps.size()<<'\n';}