There were 45 green cars.
15% of the cars were green.
⇒ 15% = 45
--------------------------------------------------------------
Find 1% :
--------------------------------------------------------------
15% = 45
1% = 45 ÷ 15
1% = 3
--------------------------------------------------------------
Find 100% :
--------------------------------------------------------------
1% = 3
100% = 3 x 100
100% = 300
--------------------------------------------------------------
Answer: There were 300 cars altogether.
--------------------------------------------------------------