See, this is why it takes me so much time to do this. I can't see simple stuff like that. I corrected that to double. But the code is still obviously wrong because I can't get a negative average and...
Type: Posts; User: Excelisus
See, this is why it takes me so much time to do this. I can't see simple stuff like that. I corrected that to double. But the code is still obviously wrong because I can't get a negative average and...
Ok, I cleaned up the code and took your advice. If I understood various nuances and pet peeves, I'd be a better programmer. I do welcome any structural comments. My averages though still yield zero....
I still haven't look at the code - I can't until I have access on my other computer when I can run the program + debugging mode. But basically the power portion is inherent in the loop itself. This...
Ok, let's see if this makes it clear:
I take 1000 random numbers between 0 and 1. I need two things from here:
1. Generate the sum of all these numbers.
2. Generate the AVERAGE of these...
Could you be more specific about including y=y*x in the loop? I thought it is already in the loop.
That's a separate issue, but it's because I don't know much about C. I use Code Blocks and used the help files to extract the format written there.
Hey guys. I know little about programming. I have made this code with some help, but there is still a problem with it. I am basically trying to create a random number generator that will calculate...