Car rental Program...so lost...

I am on my last assignment for my C++ class (thank god) and I find myself really lost. I don't know where to start. In this program I must use arrays. I am open to suggestions that anyone may have. I think I am having trouble understanding what my teacher is asking. Anything to help me clarify would be helpful.

Is this how I should declare my variables?

string license[3]={carone,cartwo,carthree};
int YTD=[365];
double percent;


You are required to write a program for a car rental agency that tracks the number of days a car has been rented in one year.
You will need the following parallel arrays:
1. A string array that contains the license number.
2. A integer array that contains the number of days used to date this year (YTD).
3. A double array that contains the percent utilized.
Your program should first ask the user for the number of days that have elapsed thus far in the calendar year.
Next ask the user to input the license number and number of days used into the parallel arrays for an unknown number of cars.
Compute the percent utilization for each vehicle and store in the double array using the formula:
percent utilization = 100 x YTD days used u
Days elapsed this year
Your program should produce the following report to a file called vehicle.dat
License Number YTD Days Used Percent Utilization
XXXXXXXX 999 999.9
XXXXXXXX 999 999.9 *** below average ***
XXXXXXXX 999 999.9
Average 999.9
Note: Print the message *** below average *** for any vehicle that is below the average percent utilization of all vehicles.
Last edited on
int YTD[365] Would be the correct way to declare the array.

There is an excellent guide on arrays on this very website.

Link: http://www.cplusplus.com/doc/tutorial/arrays/

And also, you should be glad that you have the luxury of being able to take a class on C++. ;)
Topic archived. No new replies allowed.