Question: #include #include using namespace std; int main ( ) { vector averageScores; int numIn; unsigned int i; int score; cin > > numIn; for (

#include
#include
using namespace std;
int main(){
vector averageScores;
int numIn;
unsigned int i;
int score;
cin >> numIn;
for (i =0; i numIn; ++i){
cin >> score;
averageScores.push_back(score);
}
for (int i =0; i numIn /2; ++i){
cout averageScores[i];
if (i (numIn /2)-1){
cout "*""";
}
}
cout endl;
cout endl;
return 0;
}
Im having trouble with eliminating the white space at the end of the output when the code finishes. The code im using is attached
#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!