Next time, just post in code tags like you did in post #1: 92 lines isn't so many that it needs to be attached. Try to come up with the smallest and simplest (compilable) program that demonstrates the problem and post that. If your code is so large that you must post it as attachments, it is also likely to be so large that casual readers aren't so likely to want to wade through it for free.
You should remove this from lineWithNumberAndSum because in this context you only want to seed the PRNG once, especially since time-based seeds could end up repeating the pseudorandom sequence if you keep re-seeding the PRNG within the granularity of the time, and this can result in "Number do not change" effects:
Code:
srand((unsigned) time(&t));
This looks like unnecessary use of rand() on each iteration:
Code:
for(int i=0;i<rand() % 20;i++)
if you want to loop a random number of times in the range [0, 20), then I'd suggest:
Code:
int num_iterations = rand() % 20;
for(int i=0;i<num_iterations;i++)