Problem solving help

Hello once again, I'm doing one of the final problems of my final exam of C++. I just don't understand very well how am I supposed to approach this problem.
A painting company has determined that for every 115 square feet of wall space, once gallon of paint and eight hours of labor will be required. the company charges $18 per hour for labor. Write a program that allows the user to enter the number of rooms that are to be painted and the price of the paint per gallon. it should also ask the square feet of wall space in each room. It should then display the following data. * The number of gallons of paint, *The hours of labor required, *The cost of the paint, * The labor charges, *The total cost of the paint job. (Input validation: Do not accept a value less than 1 for the numbers of rooms. Do not accept a value less than $100 for the price of paint. Do not accept a negative value for the square footage of wall space.

I figured that I needed a for loop and one array to hold the different sqf of each room, but I don't know very well how to approach this problem. This is what I got so far.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
int main()
{


   int numRooms = 0;
   int* rooms = 0;
   float priceGallon = 0;
   float squareFeet = 0;
   float hoursLabor = 18;

   //115 sqf = 1 gallon of paint + 8h of labor.
   //14.375 sqf = 1 hour, so 115 sqf = 8h labor.
   //7.1875 sqf = 30 min.
   //3.59375 sqf = 15 min.

   cout << "Number of rooms: ";
   cin >> numRooms;
   cout << "Price of paint per gallon: ";
   cin >> priceGallon;

   rooms = new int[numRooms];

    for ( int x = 0; x < numRooms; x++ )
    {
        cout << "Square feet of wall space: ";
        cin >> rooms[x];


    }
        for(int x = 0; x < numRooms; x++ )
        {
            squareFeet += rooms[x];
        }




cout << "Gallons of paint required: ";
cout << "Hours of labor required: ";
cout << "Cost of paint: ";
cout << "Labor charges: ";
cout << "Total cost of paint job: ";






}
*bump*
Now that you have the total square footage of walls to be painted, you should calculate how many gallons of paint you need. The instructions indicate that 115 ft2 requires one gallon, so with some arithmetic you should be able to get that answer. If you end up with a decimal, make sure to round up so you have enough paint.
Topic archived. No new replies allowed.