Question: the qustion i need help with is a program with these preameters in C++. You'll be using a couple of loops (for and while) ,
the qustion i need help with is a program with these preameters in C++. "You'll be using a couple of loops (for and while) , 2 void and 1 return function calls, and storing and reading data from a file." that is what i was the parameters for the program 

this is the order of operations as i have ran the program i need help updating this c++ code to fit the parameters.
#include
#include
#include
using namespace std;
struct Car{
string make;
int year;
};
int main() {
int ar[5];
Car arr[100];
string mk; int yr;
fill(ar, ar + 5, 0);
char choice;
int count=0;
do{ // type of cars available vehical cout
cin>>mk;
arr[count].make=mk; // Covering all ways of spellings if("chevy"==mk) ar[0]++; if("Chevy"==mk) ar[0]++; if("CHEVY"==mk) ar[0]++;
if("dodge"==mk) ar[1]++; if("Dodge"==mk) ar[1]++; if("DODGE"==mk) ar[1]++;
if("ford"==mk) ar[2]++; if("Ford"==mk) ar[2]++; if("FORD"==mk) ar[2]++;
if("honda"==mk) ar[3]++; if("Honda"==mk) ar[3]++; if("HONDA"==mk) ar[3]++;
if("toyota"==mk) ar[4]++; if("Toyota"==mk) ar[4]++; if("TOYOTA"==mk) ar[4]++;
// Year input cout
cin>>yr;
arr[count].year=yr;
count++; // restarting program and compiling data cout
cin>>choice;
}while(choice=='y'||choice=='Y'); // Display the data collected
cout
cout
cout
cout
cout
char chc;
cout
cin>>chc;
if(chc=='Y'||chc=='y')
{
cout
for(int j=0;j { cout } // Number of cars from program cout } return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
