Question: #include #include using namespace std; int main ( ) { int numIntegers; cin > > numIntegers; vectorintegerVector ( numIntegers ) ; for ( int i

#include
#include
using namespace std;
int main(){
int numIntegers;
cin >> numIntegers;
vectorintegerVector(numIntegers);
for(int i=0; i numIntegers; ++i)
{cin >> integerVector[i];
}
for(auto it = integerVector.rbegin(); it !=integerVector.rend();++it)
{
cout *it;
if(it != integerVector.rend()-1){
cout ",";
}
}
return 0;
}
im having trouble with the output, there is a trailing comma. the code im using is pasted and ive pasted both the question and the error
#include #include using namespace std; int main (

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!