# Thread: Please Help Me

1. ## Please Help Me

I have to create a program that generates 100 random numbers between 0 and 99,999 and store the numbers in a 10 by 10 table. Then calculate the mean, varience, and standard deviation of all the numbers.

Please help me. I'm so confused.

Thank you

2. First off, you need to create a program that generates 100 random numbers, between 0 and 99999, and stores them in a 10x10 grid... oh wait, that's what you just said.

Come on people ! At least _TRY_ your homework first!

Quzah.

3. You must have have done something, surely?
I don't think yout tutor would set you homework about a topic you havent covered.

4. Use randomize()

deviation and variance definitions; look them up.

5. Code:
```#include<stdlib.h>
#include<time.h>
#define read_the_faq_ for(i=0;i<10;i++)
#define now_would_it return 0;}
#define you_lazy_slob_ long a[10][10];
#define unregistered {srand((unsigned)time(0));
#define you_could_have_ for(j=0;j<10;j++)
#define it_wouldnt_have_hurt_ {l=rand()%100000;a[j][i]=l;}
#define do_your_ int i,j;
#define own_work_ long l;

int main()
unregistered
do_your_own_work_you_lazy_slob_you_could_have_read_the_faq_it_wouldnt_have_hurt_now_would_it```

6. The rand function returns a pseudorandom integer in the range 0 to RAND_MAX. Use the srand function to seed the pseudorandom-number generator before calling rand.

BTW: in vc's library,RAND_MAX=32767, and in the GNU library, it is 037777777.

Popular pages Recent additions