@Randy Dandy,
You can buy those at Home Depot:
2X4 Pressure treated lumber
Well, let X be the number of planks you need.
Then you have X-1 for the number of spaces, as you end with planks on both sides.
So, you know that 30 ft=360 in, right?
Then, the length of your deck contains 4X planks and 3/8(X-1) spaces.
It makes 360=4X+3/8(X-1).
Can you solve that for X?