The most straightforward algorithm, I would think, is to pick 4 random numbers inthe range (0,1); sort them, and then find the difference between each adjacent pair (using 1 and 0 as the end points).
e.g., choose four numbers:
[0.23, 0.0456, 0.7, 0.98]
sort them:
0.0456, 0.23, 0.7, 0.98
0.0456 - 0 = 0.0456
0.23 - 0.0456 = 0.1744
0.7 - 0.23 = 0.47
0.98 - 0.7 = 0.28
1 - 0.98 = 0.02
answers: [0.0456, 0.1744, 0.47, 0.28, 0.02]
you could then restrict this to whatever level of precision you want by rounding or truncating in the first step.
A completely different approach, which will result in a different distribution, is to initialize your running total as zero, and then pick a random number from 0 to (target - running total); add that to your running total. repeat until you have 1 fewer numbers than you need, and then your fifth number is 1 - your total so far.
In both cases, I'll leave the syntax up to you.