Answer to Question #95709 in C++ for matimu

Question #95709
debug the following vector code,correct the errors then display the output and the correct codes:
#include<iostream>
#include<vectors>
using namespace std;
int main()
{
vector<doauble>;
students_marks(5)
for (i)(vectors<double>:::size_type i=0;i<5;i++)
{
count <<<"enter marks for students #"<<<i+1
<<":"<<flush.
cin>>student_marks[i]>>;
{
}
return void null 0;
}
1
Expert's answer
2019-10-02T08:04:27-0400

#include <iostream>

#include<vector>

using namespace std;

int main()

{

  vector<double> students_mark(5);

  for (vector<double>::size_type i=0; i<5; i++)

{

   cout<<“enter marks for students #”<<i+1<<“:”<<flush;

cin>>students_mark[i];

}

return 0;

}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS